Use PhantomReference insteadof WeakReference for resource leak detection