I still say that max's memory mangement is insane.

BlitzMax Forums/BlitzMax Programming/I still say that max's memory mangement is insane.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

...
Although I know where this ends:

Thats a thing that depends on your implementation. If you make a list that points back to its owner, then you will need destroy methods that free up this "backlinks" to free it (its good practice to have a clean up functionality per object no mather if you program in a GC controlled environment or with trashy pointer hick-hack)
Reason for that is, that BM does not seem to use root reference counters aside the regular ref counters.

Those would fully solve the problem because if the cyclic structure can't be accessed from the root anymore, its simply dropped (as C#, Eiffel and other languages do it).
I hope that functionality will be added as it is definitely a must have for a managed, GC driven environment as any design error creates massive problems. (leaks are no that worse problem as in C / C++ as they can't harm the rest of the system but the memory pool will grow until the system freezes).
My EntitySystem already fakes this behavior to come around the various scenarios of a potential "disconnected data ring" (beside that: I don't use double linked structures as the TList implementation, that will already help you quite a lot. especially as TList is extremely unusable for depthsorting stuff)