If the finalizer is not called you will potentially get resource leaks - although there's no guarantee currently that it will be called, isn't there the assumption that if it's not called the object still exists, even if it's not referenced anywhere? ie. you still have some guarantee that if you keep allocating objects and then unreferencing them that the number of unfinalized objects will never exceed some large but fixed value.
With regard to the last point in the talk where Walter was
suggesting not calling finalizers on objects whose code has been
unloaded - would it not make more sense to simply call all the
finalizers before unloading the library?
- DConf 2013 Day 2 Talk 2: Shared Libraries in D by Mar... Andrei Alexandrescu
- Re: DConf 2013 Day 2 Talk 2: Shared Libraries in... Nick Sabalausky
- Re: DConf 2013 Day 2 Talk 2: Shared Libraries in... nazriel
- Re: DConf 2013 Day 2 Talk 2: Shared Libraries in... Meta
- Re: DConf 2013 Day 2 Talk 2: Shared Librarie... Andrei Alexandrescu
- Re: DConf 2013 Day 2 Talk 2: Shared Libraries in... Diggory
- Re: DConf 2013 Day 2 Talk 2: Shared Librarie... Steven Schveighoffer