[Glass] How can I release a malloced CByteArray ....

James Foster james.foster at gemtalksystems.com
Wed Feb 26 08:12:16 PST 2014


The short answer is “you can’t!” As indicated in the method comment, this is intended to be used to pass to C functions that take responsibility for freeing the memory. In most cases you should use CByteArray class>>#'gcMalloc:’ so that the external memory is freed automatically when the object is no longer referenced within Smalltalk.

James

On Feb 26, 2014, at 8:03 AM, itlists at schrievkrom.de wrote:

> I've created a ByteArray in "non-Smalltalk" memory via
> 
> "CByteArray malloc: 100"
> 
> Now the question: how can I release it again by Gemstone ?
> 
> Marten
> 
> -- 
> Marten Feldtmann
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list