Quote:
ExcalibursZone - just seen your rant in Chit Chat so thought I'd give this a go. If it doesn't work there are other things that may be causing your problem -
Tactic Number One :
Make sure you haven't got a public reference in the dll to something that's been passed byRef to it. For example, if you pass the players byRef then store them in a dictionary, which is used throughout the dll, you are effectively creating a link from the dll into the caller. So, when you set the object to Nothing in the caller it can't destory it because there's still a reference in existance coming from the other direction. Before setting the object to nothing in the caller try running a tidy up routine which destorys the items in the dictionary and anything else that is using byRef so there's no links from dll to caller.
Basically this is called a circular reference and it's the biggest reason for objects being left in memory when they should have been destroyed. ( .Net cures this by the way ).
A -> B -> A : Destory the link from B to A before A to B
Hope that isn't as confusing as I think it is but I'm a bit busy at the mo.
The player object is global to the entire program. Which is one of the reasons why I believe there is such a stubborn problem ... Do you think making it a local variable only to the functions that use it and killing the global scope of the object would work? when a local object is declared, and you don't set it to nothing at the end of the method will it continue to exist and eat memory or is it destroyed in much the same way as integers and strings? I can't wait for .net so I can program this puppy the right way, but vb6 is working well aside from little quirks like this.