[Patches] Re: Garbage collection patches for Python

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Thu, 10 Feb 2000 16:42:16 +0100 (CET)


nascheme@enme.ucalgary.ca wrote:
> 
> On Thu, Feb 10, 2000 at 12:06:05PM +0100, Vladimir Marangozov wrote:
> 
> > I insisted on the principle of not mixing the APIs.
> 
> Why?

Because it's a principle ;-) that makes our life easier.

> Is there any reason PyMem_DEL would ever do something
> different than PyMem_FREE?

They happen to do the same, but belong to different APIs.
The 1st one deals with raw memory, the 2nd deals with per-type sized memory.
And in the future, nobody says that the PyMem_NEW family won't evolve into
something else which could require the inlining of additional processing
in PyMem_DEL.

That's why I'd prefer to keep things separate from each other. (We're
cleaning things up after all) If we're MALLOCing, we have to be FREEing.
If we're NEWing, we have to be DELing.

> 
> Perhaps we should just get rid of (depreciate?) one set of APIs.
> 

Perhaps, but actually they have different semantics.

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252