TSimpleGraph Bug???

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

TSimpleGraph Bug???

Postby Neftalí » April 18th, 2005, 3:00 pm

Hello.

At First excuse-me for my bad English... :cry:

I'am working in a project using the TSimpleGraph component. The thematic one of the project is "Yard Plannig"; It's similar to a parking of cars, but with containers.
I'am creating aprox. 1200 objects in the simpleGraph. All it's working OK, but reviewing the application i think that in the Destroy procedure of the object TSimpleGraph the created objects are not being freed.

Thare are a simple test to make.

I Have created a Destroy Method in TRectangleNode like:

destructor Destroy; override;

and its corresponding implementation.

When the Destroy procedure of the SimpleGraph object is Executed, the code of TRectangleNode.destroy never is Execute and the object is not freed.

To ensure this i have executed the project using AQTime (Profiler) and it's confirmed this.
___________________
Neftalí
Neftalí
Member
Member
 
Posts: 4
Joined: April 18th, 2005, 2:10 pm
Location: Spain

Postby Stefan » April 19th, 2005, 11:57 am

Hi,

Thank you for reporting this.
For now I suggest you update the component yourself so that it frees the objects. We will fix this in the next release, which will be on SourceForge under the extgraph project: http://sourceforge.net/projects/extgraph

Stefan
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands

Postby Neftalí » April 19th, 2005, 2:33 pm

I already have made the changes to correct that error in my code. In the Destroy routine of the component simply i have cross the list of created objects and to release them one by one (for instruction); This change recover the lost memory.

Thanks.
___________________
Neftalí
Neftalí
Member
Member
 
Posts: 4
Joined: April 18th, 2005, 2:10 pm
Location: Spain

Postby Kambiz » April 21st, 2005, 6:33 pm

Neftalí:

Thanks for reporting the memory leak.
I fixed the memory leak in SimpleGraph.


Stefan:

Just for your information, I modified the following procedures to fix thr bug.

Code: Select all
TSimpleGraph.ObjectListChange;
TSimpleGraph.SelectionListChange;
TGraphLink.VerifyLinkedObjects;
TMemoryHandleStream.Destroy;

Thanks everybody and regards
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron