OS X Externals

Trevor DeVore lists at mangomultimedia.com
Wed Oct 13 19:53:20 EDT 2004


On Oct 13, 2004, at 4:39 PM, Mark Wieder wrote:
>
> Second, you might try replacing
>         *retstring = buffer;
>
> with
>         *retstring = istrdup(buffer);
>         free (buffer);
>
> I think you're OK on this one since you're mallocing memory and not
> freeing it, forcing the engine to do this for you, but I'm not sure.

As long as the memory that *retstring is pointing to was created with 
malloc (or similar) then you are okay and don't need to free it.  The 
engine will take care of it.  So the original method is fine.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list