View Full Version : Views Grapher - Creating and destroying objects - Memory stack increase

02-27-2013, 01:46 PM

We do use Views 5.1 through Visual Studio .net 2003 in a big application.
We have noticed that any time we go through the cycle where we do empty the grapher and fill it with 2D graphic objects, the memory of the process does increase (we checked it in the task manager).
So we did check that any object that was instanciated (through constructor) while filling the grapher was although removed (through destructor) while emptying the grapher.
Whatever we do memory used by the process never stop increasing. After a few hours the user has to close the application.

1/ Is there any bug description in your knowledge database that looks like this one ?
2/ Is there any internal ressource that is used by the grapher and could be not released ?

Thank you in advance for your help

Best regards,
JP Martins

02-28-2013, 02:13 AM
Hello jpmartins,
No sorry there are no registered case similar to yours.

Just curious, how are the nodes and links removed from the grapher?
Are you using IlvManager::removeAll (teh grapher being a derived class from manager) or IlvGrapher::removeNode and IlvGrapgher::removeLink?

All these 3 functions take an optional boolean argument 'destroyIt' which tells the grapher or manager to delete the objects. The default value is IlFalse thus the objects are not deleted and it is up to the application to care for their destruction.


02-28-2013, 02:41 AM

Thank you for your quick answer.
Here is the action list in our grapher reset member :

Gph::Reset( IlvBoolean Redraw ) :
initReDraws ();

//c deselect all graphic objects

//c destroy all graphic objects - First argument request for destroying graphic objects
deleteAll( IlvTrue, IlvFalse );

reDrawViews ();

if ( redraw )

// Abandon / free all IlvPalette resources


03-05-2013, 02:07 AM

Do you have any news on this issue ?

Is there any grapher/manager resources that are internal (I mean we cannot manage them in our application source code) and would explain that memory heap is increasing every empty/fill cycle ?

Do you have any idea how I could check where this memory is instantiated (any tool or function that you have in the manager/grapher API) ?

Thank you,
JP Martins

03-14-2013, 11:47 AM
Sorry, I have overlooked your follow-ups.

Actually I don't see any leak in IlvGrapher::deleteAll but I will investigate with the assistance of the Support Team.

Otherwise, sorry there's no API to check the memory used up by a grapher.


03-15-2013, 06:50 AM
After analysis it seems the leak you mention is not a real one but could be related to static initializations. When the load/delete operation is repeated the used memory amount does not go back down to the level it had before starting but stays constant through the iterations.

Actually a small tool is available for memory tracking. Please look at http://kb.roguewave.com/kb/index.php?View=entry&EntryID=2059