I get fussy about memory issues. Just because the GC handles memory compaction, that means that we should not care about memory and performance.Quote:
@Viscount S: i understand that you guys wish to keep memory usage low, but you wouldn't even sacrifice a couple of mb's at max (and not even that much if done correctly) of memory for a much better structure? Memory in this situation should not even be considered. For example you saying Millions of Dialog instances can be created, while that is possible if someone decided to spam a million packets to talk to an NPC, and that's even if you have not handled it to even have a delay or check if he's already interacting with an NPC, then yes. But that's not going to happen?
@CptSky: sorry, i don't know much about .net and/or it's collections but you get the point.
Also a switch statement isn't a series of if elses, it is more of a goto table:
Code:
switch(VAL)
{
goto case<VAL>;
case 0:
// code gets executed.
goto END;
case 1:
//code gets executed
goto END;
}
END: