[PD-dev] To free inlets and outlets or not to free in-/out-lets?

Fred Jan Kraan fjkraan at xs4all.nl
Fri Nov 4 16:45:25 CET 2016


Hi Miller,

> Hi Fred Jan -
>
> normally objects simply allow Pd to free inlets/outlets for them - the only
> exeption is the "canvas" object whichcan add or delete them dynamically.
> There is then a lot of other stuff that has to be carefully taken care
> of (redrawing, etc).

Thanks for the response. Not having to manage the inlets and outlets 
simplifies the code to maintain.

I would never have expected these complexities behind the gray rectangle 
that canvas is... There are some GUI objects I try to maintain, but this 
is quite a different beast.
>
> cheers
> Miller

Greetings,

Fred Jan

>
> On Fri, Nov 04, 2016 at 03:43:24PM +0100, Fred Jan Kraan wrote:
>> Hi Devs,
>>
>> According to the Externals-HOWTO it is required to free the created inlets
>> and outlets. This makes sense as Pd allocates memory for them and frees it
>> on calling inlet_free() and outlet_free(). But the practice is not very
>> common, and the (recent) pd_free also attempts to free them. It does this
>> after checking there is a *_free() method and calling it.
>>
>> Is there a good reason to free the in- and out-lets from the object *_free()
>> method anyhow? After all, it is extra code, that could contain errors too?
>>
>> Greetings,
>>
>> Fred Jan
>>
>> _______________________________________________
>> Pd-dev mailing list
>> Pd-dev at lists.iem.at
>> https://lists.puredata.info/listinfo/pd-dev
>



More information about the Pd-dev mailing list