PDA

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



jpmartins
02-27-2013, 01:46 PM
Hi,

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

cmartin
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.

Claude

jpmartins
02-28-2013, 02:41 AM
Hi,

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
deSelectAll();

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

reDrawViews ();

if ( redraw )
{
reDraw();
}

// Abandon / free all IlvPalette resources
HE_EdtObj::AbandonnerRessources();

}

jpmartins
03-05-2013, 02:07 AM
Hi,

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

cmartin
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.

Claude

cmartin
03-15-2013, 06:50 AM
Hello,
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

HTH,
Claude