<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
 <channel>
  <title>SmaugMuds.org - Forum: SWR FUSS</title>
  <link>http://www.smaugmuds.org/index.php?a=rssfeed&amp;f=31</link>
  <description>The largest Smaug community resource site. - General support for issues specific to Star Wars Reality. Covers coding, building, development, administration, and bug reports.</description>
  <language>en</language>
  <generator>SmaugMuds.org</generator>
  <ttl>60</ttl>
  <item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20937#p20937</link>
 <description>It really isn't to bad and I long ago decided to just put everything in it instead of using both shared and non shared strings to make it easier to keep track of.</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20937#p20937</guid>
 <pubDate>Mon, 9 Aug 2010 17:42:18 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (Remcon)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20922#p20922</link>
 <description>Shared strings introduce a (very small) amount of overhead during creation and freeing, and take up a (very small) amount of extra memory. Additionally, shared strings are, well, shared, so you can't just modify it as you please: you need to create a temporary copy, modify it, and then put it back into the shared string system.&lt;br /&gt;
&lt;br /&gt;
So you would not use a shared string if:&lt;br /&gt;
- you were very concerned about every last byte of memory and processor instruction (the chances of this being true are next </description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20922#p20922</guid>
 <pubDate>Sun, 8 Aug 2010 21:10:38 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (David Haley)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20919#p20919</link>
 <description>&lt;br /&gt;
[quote=David Haley][quote]What's the difference between str_dup/dispose and the STRFREE/ALLOC anyway? [/quote]&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
STRFREE and STRALLOC use a shared string mechanism (using reference counting) whereas str_dup and dispose don't. So, dispose will delete memory immediately even if other strings are using it; strfree on a non-shared pointer will look for reference count data that doesn't exist.[/quote]What's an example of a situation where str_dup would be favored over STRALLOC?</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20919#p20919</guid>
 <pubDate>Sun, 8 Aug 2010 06:00:20 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>Shoie13@gmail.com (Banner)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20918#p20918</link>
 <description>[quote]What's the difference between str_dup/dispose and the STRFREE/ALLOC anyway? [/quote]&lt;br /&gt;
STRFREE and STRALLOC use a shared string mechanism (using reference counting) whereas str_dup and dispose don't. So, dispose will delete memory immediately even if other strings are using it; strfree on a non-shared pointer will look for reference count data that doesn't exist.</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20918#p20918</guid>
 <pubDate>Sat, 7 Aug 2010 23:00:32 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (David Haley)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20917#p20917</link>
 <description>[quote=Kayle]You need to double check that the clan names aren't being assigned using str_dup anywhere. They all need to use the same. if you want to use STRALLOC/STRFREE on the clan_name fields, then ALL changes to clan_name need to use STRALLOC/STRFREE, not just the accounts part of things.[/quote]&lt;br /&gt;
Everywhere I access the player-&gt;clan variable I use STRFREE/ALLOC. Does that mean this is bad (can I not smash an str_dupped variable into a STRALLOC'd variable)?&lt;br /&gt;
&lt;br /&gt;
[code]&lt;br /&gt;
ch-&gt;pcdata-&gt;clan-&gt;name </description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20917#p20917</guid>
 <pubDate>Sat, 7 Aug 2010 11:32:45 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>Shoie13@gmail.com (Banner)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20914#p20914</link>
 <description>[quote]&lt;br /&gt;
[code]&lt;br /&gt;
         if( ch-&gt;pcdata-&gt;clan )&lt;br /&gt;
         {&lt;br /&gt;
            if( player-&gt;clan )&lt;br /&gt;
               STRFREE( player-&gt;clan );&lt;br /&gt;
            player-&gt;clan = STRALLOC( ch-&gt;pcdata-&gt;clan-&gt;name );&lt;br /&gt;
         }&lt;br /&gt;
         else&lt;br /&gt;
         {&lt;br /&gt;
            if( player-&gt;clan )              &lt;br /&gt;
               STRFREE( player-&gt;clan ); // LINE 178&lt;br /&gt;
            player-&gt;clan = STRALLOC( &quot;&quot; );&lt;br /&gt;
         }&lt;br /&gt;
[/code]&lt;br /&gt;
[/quote]&lt;br /&gt;
Instead of doing it like that I would do it like this&lt;br /&gt;
[code]&lt;br /&gt;
         player-&gt;clan = N</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20914#p20914</guid>
 <pubDate>Sat, 7 Aug 2010 09:38:32 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (Remcon)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20912#p20912</link>
 <description>You need to double check that the clan names aren't being assigned using str_dup anywhere. They all need to use the same. if you want to use STRALLOC/STRFREE on the clan_name fields, then ALL changes to clan_name need to use STRALLOC/STRFREE, not just the accounts part of things.</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20912#p20912</guid>
 <pubDate>Sat, 7 Aug 2010 07:34:13 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (Kayle)</author>
</item>
<item>
 <title>Help with garbage variables</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20909#p20909</link>
 <description>I'm saving player data to my accounts and getting garbage saved under the clan variable.&lt;br /&gt;
&lt;br /&gt;
[code]&lt;br /&gt;
#PLAYER&lt;br /&gt;
Name    Matthis~&lt;br /&gt;
Level   100&lt;br /&gt;
Clan    Àå@     h98     ^Ðñå·^Ðñå·^Øñå·^Øñå· ñå· ñå·¨ñå·¨ñå·°ñå·°ñå·¸ñå·¸ñå·Àñå·Àñå·(w% ¨^Ò@    ^HH8    ^ØR8    Øñå·Øñå·àñå·àñå· V9      V9     ðñå·ðñå·øñå·øñå·~&lt;br /&gt;
Created 1280033744&lt;br /&gt;
LogOff  1280497022&lt;br /&gt;
LogOn  1280491969&lt;br /&gt;
Logons 3&lt;br /&gt;
Room    300&lt;br /&gt;
End&lt;br /&gt;
[/code]&lt;br /&gt;
&lt;br /&gt;
I do g</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4447&amp;p=20909#p20909</guid>
 <pubDate>Fri, 6 Aug 2010 17:32:37 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>Shoie13@gmail.com (Banner)</author>
</item>
<item>
 <title>move_char bug with positions</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4436&amp;p=20904#p20904</link>
 <description>Sounds good. :)</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4436&amp;p=20904#p20904</guid>
 <pubDate>Wed, 4 Aug 2010 21:39:02 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (Conner)</author>
</item>
<item>
 <title>move_char bug with positions</title>
 <link>http://www.smaugmuds.org/index.php?a=topic&amp;t=4436&amp;p=20903#p20903</link>
 <description>Yeah, I'll get it posted and released hopefully tomorrow after work.</description>
 <guid isPermaLink="true">http://www.smaugmuds.org/index.php?a=topic&amp;t=4436&amp;p=20903#p20903</guid>
 <pubDate>Tue, 3 Aug 2010 17:38:33 PDT</pubDate>
 <category>SWR FUSS</category>
 <author>nobody@example.com (Kayle)</author>
</item>

 </channel>
</rss>
