[geos-devel] Memory leak in RelateComputer?

=?GB2312?B?zfXTwL3c?= wang.yongjie.2008 at gmail.com
Tue May 6 02:06:51 EDT 2008

Intend to know how to release the pointer return by Geometry::Relate,
I trace the source code to class RelateComputer. There is a private
member variable named "im" initialized in the constructor.

RelateComputer::RelateComputer(std::vector<GeometryGraph*> *newArg):
	im(new IntersectionMatrix())
The variable "im" is created by operator "new", so I think it must
destroyed in the destructor, but there is nothing in the destructor of


I think "delete im; im = NULL" is needed, right?

Best regards to everyone.

Wang Yongjie
Tel:              +86(10)8282 5800 Ext. 8411
Fax:             +86(10)8282 5816
Email:          yongjiemail at gmail.com
MSN/Gtalk:  yongjiemail at gmail.com
Blog:            www.iseeker.org/blog

More information about the geos-devel mailing list