How to dispose GoText objects

I am using GoText Object and adding to goview object dynamically, it creates and removes dynamically for every frequent interval of time, every time it creates 100 to 200 gotext objects. How to clean up those objects from memory ? i did not find any dispose method. How can I dispose those objects. After some time it consumes all the system memory and thorugh out of memory exception.
Please help me on this.

Are you using a GoUndoManager?

If you don’t need undo/redo, make sure the GoDocument.UndoManager is null.

If you do need undo/redo, you probably want to make sure all of those transient changes (to add/modify/remove those GoText objects) are not recorded in the GoUndoManager. You can do that by temporarily setting GoDocument.SkipsUndoManager to true.

I am using GoUndoManger for other activities, but for the activity which i mentioned in this post do not require any undo/redo operations on those

dynamically created objects. As you mentioned i tried by making GoUndoManger as null before starting this activity but no luck. Still it is consuming lot of memory as process is going on.

Then you’ll need to make sure there aren’t any references to those “temporary” GoText objects in non-garbage collected data structures.

A GoUndoManager is the only place where an unlimited number of “deleted” objects might remain in a normal application.

Or perhaps the memory is being consumed by instances of objects other than GoObject.