graphics: use destructor callback in ref() to avoid self.gc. ref #1270