DebugDumpObjects Method
Used to determine if your application is leaking memory.
Syntax
DebugDumpObjects filename
Parameters | ||
filename |
The name of the text file that will be created when the method is called. |
Notes
REALbasic manages memory for you. This means that it allocates memory for new objects your application creates, keeps track of which objects your application is currently using and removes objects from memory when they are no longer in use. If your code creates circular references this might prevent objects from being released when you expect them to. See, for example, the discussion of circular references in StackOverflowException.
The DebugDumpObjects method can help determine if you have a memory leak. When you call DebugDumpObjects, the method creates a text file in the same location as your application or the same location as REALbasic if you are running your application in the IDE. This text file contains the amount of memory currently being used by objects like windows, controls, instances of classes, etc. The text file also lists all of the objects in memory. You can determine if a memory leak exists by calling this method at various times and then comparing the text files that are created to determine if the objects in memory are what you are expecting to be in memory.
Example
The following line of code creates the text file described above: