Browse files

added actual disposal to the dispose method

  • Loading branch information...
1 parent e2296dd commit 812daa1da947340499095415e1e657a0d8c50b21 Ijwu committed Oct 10, 2012
Showing with 5 additions and 4 deletions.
  1. +0 −1 PickBlock.booproj
  2. +5 −3 PickMain.boo
View
1 PickBlock.booproj
@@ -62,7 +62,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="AssemblyInfo.boo" />
<Compile Include="PickMain.boo" />
</ItemGroup>
<Import Project="$(BooBinPath)\Boo.Microsoft.Build.targets" />
View
8 PickMain.boo
@@ -185,7 +185,10 @@ public class PickBlock(TerrariaPlugin):
Commands.ChatCommands.Add(Command("pickblock",PickBlock, "pick"))
protected def Dispose(disposing as bool):
- super.Dispose(disposing)
+ if disposing:
+ GetDataHandlers.TileEdit -= OnTileEdit
+ super.Dispose(disposing)
+
private def PickBlock(args as CommandArgs):
player = Players[args.Player.Index]
@@ -229,5 +232,4 @@ public class PickBlock(TerrariaPlugin):
if player.pick:
GiveBlock(args.Player.Index, args.EditType)
- args.Handled = true
-
+ args.Handled = true

0 comments on commit 812daa1

Please sign in to comment.