in reply to Uncollected garbage leads to swapping ...

One thing I sometimes do if I'm not sure some datastructure is getting cleaned up (or when EXACTLY it gets cleaned up) is to make a "Canary" class, and add a reference to a new canary in each (interesting) instance of the datastructure, counting them as I go. Class Canary also gets a DESTROY method where I lower the count again. This counter will then at any point tell me how many of the datastructures are still around. And quite often the datastructure can itself can be the object that gets counted, so you don't even need an extra class.
  • Comment on Re: Uncollected garbage leads to swapping ...