Use a ReferenceQueue to sweep dead references