diff --git a/2.5DHero/2.5DHero/Screens/BattleIntroScreen.vb b/2.5DHero/2.5DHero/Screens/BattleIntroScreen.vb index f011eb88a..fef6ca1b7 100644 --- a/2.5DHero/2.5DHero/Screens/BattleIntroScreen.vb +++ b/2.5DHero/2.5DHero/Screens/BattleIntroScreen.vb @@ -190,6 +190,7 @@ Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID) If Not t Is Nothing Then Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F) + 'It will leak t3 = TextureManager.TextureRectangle(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y))) End If End If @@ -252,6 +253,7 @@ Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID) If Not t Is Nothing Then Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F) + 'It will leak t3 = TextureManager.TextureRectangle(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y))) End If End If diff --git a/2.5DHero/2.5DHero/Screens/MapScreen.vb b/2.5DHero/2.5DHero/Screens/MapScreen.vb index 57ab12314..c72e47dfe 100644 --- a/2.5DHero/2.5DHero/Screens/MapScreen.vb +++ b/2.5DHero/2.5DHero/Screens/MapScreen.vb @@ -385,7 +385,10 @@ c = Color.Gray End If - Core.SpriteBatch.Draw(Route.getTexture(objectsTexture, isSelected), Route.getRectangle(mapOffset), c) + ' Plz Fix It Aragaz Plz + Dim texture = Route.getTexture(objectsTexture, isSelected) + Core.SpriteBatch.Draw(texture, Route.getRectangle(mapOffset), c) + texture.Dispose() Next End If @@ -401,7 +404,10 @@ c = Color.Gray End If - Core.SpriteBatch.Draw(City.getTexture(objectsTexture, isSelected), City.getRectangle(mapOffset), c) + ' Plz Fix It Aragaz Plz + Dim texture = City.getTexture(objectsTexture, isSelected) + Core.SpriteBatch.Draw(texture, City.getRectangle(mapOffset), c) + texture.Dispose() Next End If @@ -417,7 +423,10 @@ c = Color.Gray End If - Core.SpriteBatch.Draw(Place.getTexture(objectsTexture, isSelected), Place.getRectangle(mapOffset), c) + ' Plz Fix It Aragaz Plz + Dim texture = Place.getTexture(objectsTexture, isSelected) + Core.SpriteBatch.Draw(texture, Place.getRectangle(mapOffset), c) + texture.Dispose() Next End If @@ -643,6 +652,7 @@ Return New Rectangle(CInt(Me.getPosition().X + offset.X), CInt(Me.getPosition().Y + offset.Y), sizeX, sizeY) End Function + ' It will leak Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D If Me.T Is Nothing Or isSelected = True Then Dim r As Rectangle @@ -794,6 +804,7 @@ Return New Rectangle(CInt(Me.getPosition().X + PositionOffset.X + offset.X), CInt(Me.getPosition().Y + PositionOffset.Y + offset.Y), CInt(sizeX), CInt(sizeY)) End Function + 'It will leak Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D If Me.T Is Nothing Or isSelected = True Then Dim r As Rectangle @@ -943,6 +954,7 @@ Return New Rectangle(CInt(Me.getPosition().X + PositionOffset.X + offset.X), CInt(Me.getPosition().Y + PositionOffset.Y + offset.Y), CInt(sizeX), CInt(sizeY)) End Function + 'It will leak Public Function getTexture(ByVal FullTexture As Texture2D, ByVal isSelected As Boolean) As Texture2D If Me.T Is Nothing Or isSelected = True Then Dim r As Rectangle diff --git a/2.5DHero/2.5DHero/Screens/NewGameScreen.vb b/2.5DHero/2.5DHero/Screens/NewGameScreen.vb index 184872a88..d79e318fa 100644 --- a/2.5DHero/2.5DHero/Screens/NewGameScreen.vb +++ b/2.5DHero/2.5DHero/Screens/NewGameScreen.vb @@ -367,6 +367,7 @@ CanMuteMusic = False If ControllerHandler.ButtonPressed(Buttons.X) = True Then + 'It will leak Core.SetScreen(New InputScreen(Core.CurrentScreen, "Player", InputScreen.InputModes.Name, Me.CurrentText, 14, {TextureManager.TextureRectangle(TextureManager.GetTexture("Textures\NPC\" & startSkins(SkinIndex)), New Rectangle(0, 64, 32, 32))}.ToList(), AddressOf Me.ConfirmInput)) Else KeyBindings.GetNameInput(Me.CurrentText, 14) diff --git a/2.5DHero/2.5DHero/Screens/TradeScreen.vb b/2.5DHero/2.5DHero/Screens/TradeScreen.vb index 35c857be1..e1c15b37a 100644 --- a/2.5DHero/2.5DHero/Screens/TradeScreen.vb +++ b/2.5DHero/2.5DHero/Screens/TradeScreen.vb @@ -1220,6 +1220,7 @@ Public Class TradeScreen Core.SpriteBatch.DrawString(Font, Text, New Vector2(Position.X + Height + 10, Position.Y + textY), Color.White) End Sub + ' It will leak. Private Function GetItemTypeTexture(ByVal itemType As Items.ItemTypes) As Texture2D Dim i As Integer = 0 Select Case itemType