All pastes #38241 Raw Edit

Something

public text v1 · immutable
#38241 ·published 2006-01-23 20:20 UTC
rendered paste body
    Protected Overrides Sub Finalize()
        If Not PaintThread Is Nothing Then
            Try
                PaintThread.Abort()
            Catch : End Try
        End If
        If Not MySprite Is Nothing Then
            Try
                MySprite.Dispose()
            Catch : End Try
        End If

        If Not MyDevice Is Nothing Then
            Try
                If MyDevice.Disposed = False Then
                    MyDevice.Dispose()
                End If
            Catch : End Try
        End If

        MyBase.Finalize()
    End Sub