From pykde Sat Apr 23 11:47:32 2005 From: Phil Thompson Date: Sat, 23 Apr 2005 11:47:32 +0000 To: pykde Subject: Re: [PyKDE] Leaking in virtual handler Message-Id: <200504231247.32308.phil () riverbankcomputing ! co ! uk> X-MARC-Message: https://marc.info/?l=pykde&m=111425691805664 On Wednesday 20 April 2005 10:09 pm, James Emerton wrote: > I have found a memory leak owing to how SIP handles virtual methods. > If a type conversion is done by sipParseResult(), a new object is > allocated but never deleted. > > I have an interface that returns a QString. If I implement this in > python and return a python string, a conversion to QString is > performed by creating a new QString instance. This instance is never > deallocated. > > I have attached a patch which appears to correct this. I am not > entirely comfortable with the way I am detecting whether sipResOrig is > the same as the pointer contained in sipResObj. The patch isn't quite right - but I think the basic idea is sound. It will be in the next snapshot. Thanks, Phil _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde