Re: [julia-users] How can I do something when an object is deallocated?

2016-04-14 Thread Dawei Si
Thank you! This is just what I want! 在 2016年4月14日星期四 UTC+8下午11:34:55,Isaiah写道: > > http://docs.julialang.org/en/release-0.4/stdlib/base/#Base.finalizer > > On Thu, Apr 14, 2016 at 11:15 AM, Dawei Si > wrote: > >> I'm writing a program in julia with an C library that provides

Re: [julia-users] How can I do something when an object is deallocated?

2016-04-14 Thread Isaiah Norton
http://docs.julialang.org/en/release-0.4/stdlib/base/#Base.finalizer On Thu, Apr 14, 2016 at 11:15 AM, Dawei Si wrote: > I'm writing a program in julia with an C library that provides "new" and > "free" function, and I want to store a pointer in my custom type in julia. > When

[julia-users] How can I do something when an object is deallocated?

2016-04-14 Thread Dawei Si
I'm writing a program in julia with an C library that provides "new" and "free" function, and I want to store a pointer in my custom type in julia. When an instance of the type is created it will create an object in the C library, but how can I free it when the object in julia is deallocated?