Folks:
I wish know how old a object is.
Any have code for this ?
Thanks in advance
Edgar
Only for new objects? If so, you could add an instance variable to Object and
store a timestamp.
On 03.11.2012, at 15:26, Edgar J. De Cleene wrote:
> Folks:
>
> I wish know how old a object is.
>
> Any have code for this ?
>
> Thanks in advance
>
> Edgar
On Sun, Nov 4, 2012 at 2:45 PM, Max Leske wrote:
> Only for new objects? If so, you could add an instance variable to Object
> and store a timestamp.
>
>
Well, kind of ;) Because if you do that, your image will crash. This is
because the VM directly accesses (by offset) certain instVars of certa
ups :)
On 04.11.2012, at 15:04, Mariano Martinez Peck wrote:
>
>
>
> On Sun, Nov 4, 2012 at 2:45 PM, Max Leske wrote:
> Only for new objects? If so, you could add an instance variable to Object and
> store a timestamp.
>
>
> Well, kind of ;) Because if you do that, your image will crash
Hi Edgar--
Do you really want to know how old an object is, or just whether
it's older than some other object? If you don't care about degrading the
identity hash distribution, you could steal a few bits from the object
header for a counter.
-C
--
Craig Latta
www.netjam.org/resume
+31 6
On 11/4/12 4:33 PM, "Craig Latta" wrote:
>
> Hi Edgar--
>
> Do you really want to know how old an object is, or just whether
> it's older than some other object? If you don't care about degrading the
> identity hash distribution, you could steal a few bits from the object
> header for a