[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Leaking in virtual handler
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2005-04-23 11:47:32
Message-ID: 200504231247.32308.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic