On Wed, Dec 9, 2015 at 2:27 PM, Ben Ward <axolotlfan9...@gmail.com> wrote: > Thanks Stefan, > > After googling the method I noticed some github issues where Jeff said that > finalizer is inefficient and that we should not use it so much #11207. > Should I be concerned about this?
You can use finalizers but you should generally explicitly free external resources or don't get upset when the GC doesn't free it for a long time, (even after manually calling gc) > > The reason I ask is I'm about to try and forge ahead with BioJulia's Dat.jl, > and I guess stream work, or types associated with a stream field are a > possibility. > > On Wednesday, December 9, 2015 at 7:16:25 PM UTC, Stefan Karpinski wrote: >> >> http://docs.julialang.org/en/release-0.4/stdlib/base/#Base.finalizer >> >> On Wed, Dec 9, 2015 at 2:12 PM, Ben Ward <axolotl...@gmail.com> wrote: >>> >>> Hi, >>> >>> I'm not sure of the answer, but is there an equivalent of the concept of >>> a class destructor in Julia? I can imagine a situation where there is some >>> type where a field is something like - for example - a file stream, and you >>> want to make sure if that variable gets deleted by the gc, then the stream >>> that is one of those variables get's closed. >>> >>> Best, >>> Ben. >>> >> >