It's that way because it use less ressource, here an example :
If you have 100 users online, that mean you will have 100 instance of AttackManager, with my method when the packet is handled and the function RocketAttack is called, the code is executed then it's garbage collected.
Actually you can't garbage collect code (I know you didn't mean that but you said it in a confusing way). Your code is executed. It might get some references to class instances and the reference counter for that instance is increased. Once you leave the scope where you acquired that reference to the instance the reference counter will be decreased again. If the reference counter is 0 the object will be garbage collected on the next run of the gc. But most of the time those objects (Map, Session for example) are kept alive somewhere in a List/Dictionary in one of the managers so there will be nothing which gets collected after a function. Just at disconnects garbage collection will actually be effective. But yes creating a new MovementManager like cryz does is slower than yours. Just wanted to correct the gc part.
In case someone wants to know how that reference counting works: Look at some c++ shared_ptr implementations. The only difference to the .net version is that the c++ version will collect it instantly.
[Open Beta] Orbit Reborn - Private Server 10/28/2014 - DarkOrbit - 105 Replies http://i.epvpimg.com/YgS1f.png
Presentation
Orbit Reborn is a DarkOrbit private server. This server try to bring back the old gameplay from 2008, that means there's no : PET, RSB, Hellstorm, ...
Features
- maps 1-1 / 2-1 / 3-1 / 4-1 / 4-2 / 4-3 / 4-4
- rockets : R-310, PLT-2026, PLT-2021
[Selling] Orbit Reborn Acc. 09/20/2014 - Browsergames Trading - 0 Replies Sellin "a" Orbit Reborn Acc with 275 Kills and Blue Design.^^
10 e*gold fast deal no probs.^^
[DarkOrbit] Orbit Reborn Private Server 02/28/2014 - DarkOrbit - 4 Replies Project presentation
Orbit Reborn is a private server of the game Dark Orbit. This server is developed only by me and is in Beta test.
How to join the server ?
You can join Orbit Reborn with this url = orbit-reborn
Orbit Reborn have also a TS3=orbit-reborn.com
orbit-reborn.com 01/20/2014 - Browsergames Trading - 1 Replies Orbit Reborn is the link its a darkorit remake but the old servers meaning just plain ships no pilot points pets rsb just x1,x2,x3,x4,sab its pvp battles private server you just sign up on the link its free to it keeps improving its awesome come join!!!!:rtfm::rtfm::rtfm::rtfm::rtfm: