I would not want to copy the code for a new CZ, i would rewrite most of it to fit the needs of an "action"-game and no simulation. so this bugs wont happen in a possible new version of cz.
About the problems of flightsim in multiplayer: cant check it right now....
but i remember that i used some code of which i thought it might cause desyncs and i just wanted to try it because it was much easier and with less lag (as long as it worked, the first tests made me think it works)
multiplayer leaks? hm they are quite unlikely, however, i noticed that once, too... well i did not know where to search for the bug and single player worked perfectly, so, as it is meant as single player originally, it was okay for me... i did not thought people might really want to play this online, because it lags, especially for more than 2 or 3 players...
maybe i will look at it when the laptop is back, but that isnt sure...
are you sure they are memory leaks? task manager shows a growth in ram usage? because my code does not create any handles at all ^^ (except for dummy units which *should* be recycled, not a single unit is destroyed in normal flight / fight, only when changing the plane, but destroying a unit correctly is no leak either, so... dont know)
a good idea would be to check whether it gets also laggy when both players are just resting somewhere with their planes, not using weapons... (because that creates units, effects and so on)
and what about same game time with human + ai?
ah guys, maybe i got it now? strings do leak... then its just that multiboard with the lot of different numbers (-> strings) changing often... disabling them temporarly would be worth a try, there are other possibilies (for example a leaderboard, the right column takes integers, not strings there, and i doubt the internal conversion to strings also leaks)
all other "leaks" would not lead to lag, but to error messages (could not allocate...), because i would be leaking structs
memory leak with ai control... hm, maybe the ai controls the rudders differently, flies differently and causes more string leaks? dont know ^^ or its because the ai fires rockets randomly across the map
that could all be found out by testing, BUT i dont know whether it would be worth it...
if i really decide to make a new CZ version, then there would not really be a need to fix the flightsim map, as single player would be enough... (however the string-thing is worth a try in any case, its not much work)
and: an implementation of this engine into cz.... not for 2-3 players... the cz engine should be capable of at least 12 vehicles at the same time (though it would be okay that 12 vehicles start to get a bit laggy)
i am already thinking of ways how to reduce lag: reduce collision precision, reduce simulation, maybe make ground vehicles use more or less 2d-physics, as in combat zone, im not even sure whether it would be a good idea to let aircrafts roll like in flightsim, or maybe use a flat ground again (easier for camera, easier for ground collision, easier for vehicles' placement and rotation, easier for the players to aim, possibility to use SetUnitX/Y instead of SetUnitPosition for aircrafts, and no need for GetLocationZ any longer, which is otherwise called up to 1000 times a second), "sleeping" objects when they are not moved is a good idea, too, slower physics framerate (and interpolation between the steps), calculating the minimum time a bullet would need to collide with the next object, and then stop checking for collisions for that time, maybe filter possible objects from the beginning, create bounding volumes for collision shapes, no 3d rotation (though that would be one of the main improvements), or maybe no 3d rotations for ground vehicles, but only for aircrafts (though maybe its even for an action game that the control is easy, helicopters would maybe be a bit difficult to control for example)
we will see
EDIT: by the way, the 2d physics:
http://www.hiveworkshop.com/forums/pastebin.php?id=fadpoc
i dont have wc3, so i cant tell you the current properties set in the map, just try it...
EDIT2: got another idea!!! combat zone only used a flat terrain and was... well... okay...
and terrain height is the only thing you cannot easily change with scripts, SO, it would be possible to create random terrains when a flat ground is used

random streets, buildings and so on, that would probably also be interesting, also interesting for me^^