I'm ready to pack it in. I've been outsmarted by .NET's garbage collector (A rant, not a question)
-
I did it slightly differently - I wrote a class to implement something like an [Objective-C autorelease pool](https://www.informit.com/articles/article.aspx?p=1806938&seqNum=7), which our COM object wrappers added themselves to automatically. The pool was released in a [`finally` block](https://docs.oracle.com/javase/tutorial/essential/exceptions/finally.html) & that would release all the COM objects that had been allocated and finished - something like this... ```java AutoReleasePool.createPool(); // Push a new pool onto the stack of pools try { ... Do stuff ... } finally { AutoReleasePool.releasePool(); // Pop the top pool in the stack , releasing all the objects in it } ```
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
that seems even more complicated, but you do you. I don't know the whole picture anyway so I'm just talking smack here. :laugh:
Real programmers use butterflies
-
that seems even more complicated, but you do you. I don't know the whole picture anyway so I'm just talking smack here. :laugh:
Real programmers use butterflies
Yeah, completely different scenario - I was dealing with potentially hundreds of thousands of COM objects that needed to be created from Java, so couldn't go with a single C memory reference.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p