Re: Remove usage of finalizers ?
От
Heikki Linnakangas
Тема
Re: Remove usage of finalizers ?
Дата
Msg-id
526814C5.8060106@vmware.com
Ответ на
Re: Remove usage of finalizers ? (Steven Schlansker)
Список
Дерево обсуждения
Remove usage of finalizers ? "Heiko W. Rupp" <hwr@pilhuhn.de>
Re: Remove usage of finalizers ? David Johnston <polobo@yahoo.com>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? "Heiko W. Rupp" <hwr@pilhuhn.de>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? "Heiko W. Rupp" <hwr@pilhuhn.de>
Re: Remove usage of finalizers ? Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Remove usage of finalizers ? Dave Cramer <pg@fastcrypt.com>
Re: Remove usage of finalizers ? Tom Dunstan <pgsql@tomd.cc>
Re: Remove usage of finalizers ? "Heiko W. Rupp" <hwr@pilhuhn.de>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? "Heiko W. Rupp" <hwr@pilhuhn.de>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? John R Pierce <pierce@hogranch.com>
Re: Remove usage of finalizers ? Steven Schlansker <stevenschlansker@gmail.com>
Re: Remove usage of finalizers ? Adib Saikali <adib.saikali@gmail.com>
Re: Remove usage of finalizers ? Steven Schlansker <stevenschlansker@gmail.com>
Re: Remove usage of finalizers ? Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? Dave Cramer <pg@fastcrypt.com>
Re: Remove usage of finalizers ? David Wall <d.wall@computer.org>
Re: Remove usage of finalizers ? Vitalii Tymchyshyn <vit@tym.im>
Re: Remove usage of finalizers ? Tom Dunstan <pgsql@tomd.cc>
Re: Remove usage of finalizers ? Tom Dunstan <pgsql@tomd.cc>
Re: Remove usage of finalizers ? Péter Kovács <peter.dunay.kovacs@gmail.com>
Re: Remove usage of finalizers ? Gavin Flower <GavinFlower@archidevsys.co.nz>
On 23.10.2013 21:04, Steven Schlansker wrote: > > On Oct 23, 2013, at 10:58 AM, Adib Saikali wrote: > >> Seems to me that PhantomReferences can solve this problem as they will provide the ability to the cleanup without causing the performance issues with the finalizers. I am not familiar with the postgres jdbc driver code base so I have no idea how much work is involved in switching from finalizers to phantom references. >> >> Can anyone with knowledge of the jdbc code base comment on the practicality of moving from finalizers to phantom reference. > > Do we in fact know that phantom (or weak?) references are cheaper than Finalizers? Well, we *already* use phantom references to clean up server-side resources in the SimpleQuery and Portal classes. I think that's actually already enough to avoid server-side resource leaks if an application neglects to close Statements. Rather than discussing what might be the best way to use finalizers or phantom references to replace the current finalizer in the Statement class, I wish someone would just try to remove it and see what happens. - Heikki
В списке pgsql-jdbc по дате отправления