K
Karl Gorden
I have two objects in seperate areas of my code, that are supposed to come
from an object pool. I think there is a bug somewhere and two copies of
these objects are appearing. I've tried my best to track it down but I can't
seem to isolate this.
What I want to do is on each access of these objects, print out some
information about the object so I know for certain if I've got two copies.
So is there a way to output the object memory address? If they are different
then I know I have two copies. I know toString() tends to print out the
memory address but my objects subclass another object that overrides this
and marks it final.
I don't have the objects together so I can't do obj1 == obj2.
Any help ?
from an object pool. I think there is a bug somewhere and two copies of
these objects are appearing. I've tried my best to track it down but I can't
seem to isolate this.
What I want to do is on each access of these objects, print out some
information about the object so I know for certain if I've got two copies.
So is there a way to output the object memory address? If they are different
then I know I have two copies. I know toString() tends to print out the
memory address but my objects subclass another object that overrides this
and marks it final.
I don't have the objects together so I can't do obj1 == obj2.
Any help ?