Does anyone if this can be done in Java? I have some resources that need to be cleaned up in a timely fashion and im having issues with the lag between when the object is no longer refrenced by the application and when the object is consumed by the GC. Ive been working with Visual Basic Net lately and ive found a way to suppress them.
Code:Class Demo Private m_disposed As Boolean Public Sub Disposed() If(Not m_disposed) Then Finialize() GC.SuppressFinialize(this) m_disposed = True End If End Sub Protected Overides Sub Finialize() 'perform any necessary clean up here End Sub End Class




Reply With Quote