Using dfSplat to identify object leaks: Difference between revisions

Line 69: Line 69:
=== Debug for leaky objects ===
=== Debug for leaky objects ===
Click the Restart Debug button from the toolbar.
Click the Restart Debug button from the toolbar.
[[File:dfSplat-LeakyObjects-Restart-Debug.png]]


Your program will stop at the first breakpoint.
Your program will stop at the first breakpoint.
[[File:dfSplat-LeakyObjects-Stop-at-First-Breakpoint.png]]


Let's have a look at all the objects that are currently in your program.
Let's have a look at all the objects that are currently in your program.


From the Tools menu, select "Object Inspector", you'll see the following dialog:
From the Tools menu, select "Object Inspector", you'll see the following dialog:
[[File:dfSplat-LeakyObjects-Object-Inspector-first-stop.png]]


At this stage we only have a FormFloatingMenu object that is defined somewhere in the Winbase.pkg file that we are pulling in.
At this stage we only have a FormFloatingMenu object that is defined somewhere in the Winbase.pkg file that we are pulling in.


Close the Object Inspector and run the program (F5) again, we are now at the 2nd breakpoint. Open the Object Inspector again.
Close the Object Inspector and run the program (F5) again, we are now at the 2nd breakpoint. Open the Object Inspector again.
[[File:dfSplat-LeakyObjects-Object-Inspector-Second-stop.png]]


As you can see now, our 20 test objects have been created.
As you can see now, our 20 test objects have been created.
Line 88: Line 96:
Re-open the Object Inspector:
Re-open the Object Inspector:


Here you can see WHY the object inspector is an interesting tool to have.
[[File:dfSplat-LeakyObjects-Object-Inspector-Last-Stop.png]]
 
Here you can see one of the reasons on WHY the object inspector is an interesting tool to have.


The objects that got destroyed are no longer listed, but the ones we "forgot" to destroy are still visible.
The objects that got destroyed are no longer listed, but the ones we "forgot" to destroy are still visible.