[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in Inspector?



>Sometimes when I inspect a list of CLOS objects with the inspector, the
>HEX values associated with the objects seems to change arbitrarily.  Here's
>a simple example:
>
>? (defvar xx (list (make-instance 'view) (make-instance 'view)))
>(#<VIEW #xB5AD69> #<VIEW #xB5ADE9>)
>? (inspect 'xx)
>#<INSPECTOR-WINDOW "XX" #xB5AED1>
>
>At this point, the inspector window opens and shows that the value of xx is
>a list of two views.  If I double-click on that list of two views in the
>inspector window to inspect these views, I get a new inspector window
>for the list.  So far, so good.
>     However, now I close this new inspector window and double-click
>on the list of two views again in the original inspector window to reopen
>the new inspector window for the list.  I repeat this closing and opening
>the inspector window for the list of two views several times.  Eventually,
>the inspector window for the list of two views shows different HEX values
>associated with the two views.  For example, I got
>   (#<VIEW #xB5A3C1> #<VIEW #xB5A431>)
>
>Does this mean the objects moved (due to garbage collection or some
>other reason)?  I have the ephemeral garbage collector on.

The hex number in the print string for views (and many other objects) is a
memory address. Hence, as you surmised, it may change whenever garbage
collection happens, ephemeral or otherwise.