as flameduck says it depends on your data structure, chasing down a cyclic data structure problem could be a nightmare
but in theory nulling all the stuff thats used should work
another idea to consider is have a function to "play" your level that uses only local vars, when the function returns from playing the level they will all go out of scope and be released
you could make it generic playlevel(l) and load in whatever data you need for level l, you could even get flash and use a function pointer for special code pertaining to specific levels...
the key is to use local vars in a function wherever possible
but in theory nulling all the stuff thats used should work
another idea to consider is have a function to "play" your level that uses only local vars, when the function returns from playing the level they will all go out of scope and be released
you could make it generic playlevel(l) and load in whatever data you need for level l, you could even get flash and use a function pointer for special code pertaining to specific levels...
the key is to use local vars in a function wherever possible