Good, now if we figure out some of these leaks we might be good to go lol.

On that lightsaber bug you posted about I would have just changed it to use the damage function also or have it update_position etc... But everyone seemed to be against that so I'll let someone else decide on the best way to deal with it.

Well on this leak I already found it, but I decided it should be fine but I don't know all that much about how all this base works so here is the leak.

When you buy a ship it creates a room for the cockpit. This room is actually where you get memory left even if you use sellship. Since the room is still left in memory. I'm not sure if the room should be removed or not etc.... I found it by tossing in checks in STRALLOC and STRFREE to tell me what was getting allocated and freed and i knoticed that only 2 things between buyship and sellship weren't getting removed. One is a "" and the other was like room flags being put into room->flags. And so then I checked to see and found the room still stays there after the ship is gone. So what's your thoughts on it etc...

What about removeship or a ship being shot down? Also, when you say it stays there, what happens when another ship is created to the same vnum? From my understanding the room is still staying in the area file?
If so, that is very bad. As you can run out of vnums from ships being bought and sold.
Or you saying its staying in memory but not the file?

Well as far as I can tell the room stays in the mud, when you copyover or anything after selling ships it will only create the ones it needs for ships that still exist. So on restart you will have sold ships cockpit room vnums available again. But aside from those it just keeps on going on vnums and keeping the rooms in the game.

Like take and buy 20 different ships and sell them as you go. then buy another ship and go to the cockpit room vnum and then start going back 1 vnum at a time and you will see all the cockpit rooms are still there that got created. Then take and hotboot and then start back at the ship that still exist vnum and try to go back you will notice they are gone. Only the one that still exist has a room. I for one wasn't sure if this was done for some reason or just an oversight but personally I agree with Kayle.

I'm not 100% sure I'm following. So I'm going to try to break it down and you can tell me if I'm right or wrong:
vnum 12001 first room for ship - cockpit of a Tie.
vnum 12002 first room for ship - cockpit of a r-41
vnum 12003 first room for ship - super star destroyer - cockpit is 12084

When I sell any of the ships in any order I see shipvnum.are cleaning out the rooms. No extra room is being left in the area file that I can see. Everything goes back to 12000 - 18000 for the vnum range.

Now I have seen something like what your saying happen before when the NUMROOM's don't match up to how many rooms are actually defined in the ship proto file. But then you start getting ships inside of other ships.

I guess I am looking for a bit more clarity, or a way to reproduce it (Or am I missing something here?) I have the latest swfotefuss a few days ago right after the new area format went in. I'll re-dl it and see if anything changes.

Is it only the cockpit flag? Maybe I need to work with larger ships. Or ships that only have the cockpit as the first room. I'll play about when I get home.

And btw that seems to for the most part fix up the buyship sellship leaking going on.
Once in awhile it will keep a link but then the next time or two it would be right back to where it started (like a delayed removal or something).

Here is you some in act_info.c also.
in act_info.c
function do_hlist
find

idx = STRALLOC( arg );

change it to

idx = arg;

find and remove

if( idx )
STRFREE( idx );

See the problem is that it does leak the idx if you were to do like "hlist test testing", because up where it does the STRALLOC it has an if( idx ) check and it returns without freeing it. It shouldn't need to be put into STRALLOCed anyways.