[Texture Disposal] This should be okay??
This commit is contained in:
parent
87840100b1
commit
ba2e052830
|
@ -97,4 +97,9 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If CanvasTexture1 IsNot Nothing
|
||||||
|
CanvasTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -522,4 +522,9 @@
|
||||||
Return startTime + duration < Date.Now
|
Return startTime + duration < Date.Now
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If blurTexture IsNot Nothing
|
||||||
|
blurTexture.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -252,6 +252,12 @@
|
||||||
Core.SpriteBatch.Draw(Me.Texture, r, Color.White)
|
Core.SpriteBatch.Draw(Me.Texture, r, Color.White)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If Texture IsNot Nothing
|
||||||
|
Texture.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Structure
|
End Structure
|
||||||
|
|
||||||
Shared gradientConfigs As New List(Of GradientConfiguration)
|
Shared gradientConfigs As New List(Of GradientConfiguration)
|
||||||
|
@ -282,4 +288,9 @@
|
||||||
Core.SpriteBatch.Draw(Canvas, startPoint, Nothing, Color, CSng(angle), Vector2.Zero, New Vector2(CSng(length), CSng(width)), SpriteEffects.None, 0)
|
Core.SpriteBatch.Draw(Canvas, startPoint, Nothing, Color, CSng(angle), Vector2.Zero, New Vector2(CSng(length), CSng(width)), SpriteEffects.None, 0)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If Canvas IsNot Nothing
|
||||||
|
Canvas.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -73,4 +73,12 @@
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("donation_screen_backadvice"), New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Press E to close").X / 2, 640), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("donation_screen_backadvice"), New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Press E to close").X / 2, 640), Color.White)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
If texture2 IsNot Nothing
|
||||||
|
texture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -358,4 +358,21 @@
|
||||||
Me.moveLearnArg = arg
|
Me.moveLearnArg = arg
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If BorderTexture1 IsNot Nothing
|
||||||
|
BorderTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
If BorderTexture2 IsNot Nothing
|
||||||
|
BorderTexture2.Dispose()
|
||||||
|
End If
|
||||||
|
If BorderTexture3 IsNot Nothing
|
||||||
|
BorderTexture3.Dispose()
|
||||||
|
End If
|
||||||
|
If BorderTexture4 IsNot Nothing
|
||||||
|
BorderTexture4.Dispose()
|
||||||
|
End If
|
||||||
|
If BorderTexture5 IsNot Nothing
|
||||||
|
BorderTexture5.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -326,4 +326,18 @@
|
||||||
ChangeBag()
|
ChangeBag()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
If texture2 IsNot Nothing
|
||||||
|
texture2.Dispose()
|
||||||
|
End If
|
||||||
|
If texture3 IsNot Nothing
|
||||||
|
texture3.Dispose()
|
||||||
|
End If
|
||||||
|
If texture4 IsNot Nothing
|
||||||
|
texture4.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -198,4 +198,12 @@
|
||||||
MenuItems.Add(Localization.GetString("item_detail_screen_back"))
|
MenuItems.Add(Localization.GetString("item_detail_screen_back"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If CanvasTexture1 IsNot Nothing
|
||||||
|
CanvasTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
If CanvasTexture2 IsNot Nothing
|
||||||
|
CanvasTexture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -279,4 +279,12 @@
|
||||||
MusicManager.ForceVolumeUpdate()
|
MusicManager.ForceVolumeUpdate()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If CanvasTexture1 IsNot Nothing
|
||||||
|
CanvasTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
If CanvasTexture2 IsNot Nothing
|
||||||
|
CanvasTexture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -553,4 +553,12 @@
|
||||||
Return Localization.GetString("new_game_oak_name_1") & name & Localization.GetString("new_game_oak_name_2")
|
Return Localization.GetString("new_game_oak_name_1") & name & Localization.GetString("new_game_oak_name_2")
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
If texture2 IsNot Nothing
|
||||||
|
texture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -541,6 +541,14 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
If texture2 IsNot Nothing
|
||||||
|
texture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Class CommandButton
|
Class CommandButton
|
||||||
|
@ -622,6 +630,14 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
If texture2 IsNot Nothing
|
||||||
|
texture2.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Class ScrollBar
|
Class ScrollBar
|
||||||
|
@ -803,4 +819,9 @@
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -216,4 +216,9 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If texture1 IsNot Nothing
|
||||||
|
texture1.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -127,4 +127,9 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If CanvasTexture1 IsNot Nothing
|
||||||
|
CanvasTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
|
@ -195,4 +195,12 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub Finalize()
|
||||||
|
If CanvasTexture1 IsNot Nothing
|
||||||
|
CanvasTexture1.Dispose()
|
||||||
|
End If
|
||||||
|
If charTexture IsNot Nothing
|
||||||
|
charTexture.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
Loading…
Reference in New Issue