IOHannes, With your suggestion the object is finally working properly. Thanks a lot.
Claude, Thanks for pointing out. I changed my code accordingly.
Best, ahmet kizilay
On Thu, May 12, 2011 at 12:09 PM, Claude Heiland-Allen claude@goto10.org wrote:
Hi,
Unrelated to your issue, perhaps, but I thought this work mentioning:
On 12/05/11 09:34, Ahmet Kizilay wrote:
t_int *ak_addthese_tilde_perform(t_int *w) {
[snip]
t_sample ** ins = getbytes(sizeof(t_sample *) * 2);
[snip]
There's a memory leak here (no corresponding call to freebytes() or whatever it is called)! And technically it's not "realtime-safe" to allocate memory in perform method (but this doesn't matter so much with the current Pd implementation, afaik).
I suggest allocating this memory in the constructor (new method) (and freeing it in the destructor), because you (probably) already know the number of inlets in the constructor (otherwise allocate in the dsp add method).
Claude
http://claudiusmaximus.goto10.org
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list