private void collectGarbage ( ) { // dispose unused objects if any NativePointerPhantomReference toCollect ; while ( ( toCollect = ( NativePointerPhantomReference ) collectableObjects . poll ( ) ) != null ) { liveComObjects . remove ( toCollect ) ; toCollect . clear ( ) ; toCollect . releaseNative ( ) ; } }
Cleans up any left over references