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

Re: Record Problem

>My problem is that sometimes when I call "dispose-record", I get the error:
>"Can't operate on free block."  As a possible solution to this, I tried:

You get this error when you try to free a block that is already free. 
You are probably attempting to dispose of the same record twice.

>(with-dereferenced-handles ((r rect))  ;; "rect" is a record of type :rect
>  (dispose-rect r :rect))

As far as I can tell, you are just thrashing random memory when you do
this.  The default storage allocation for records is :pointer, not
:handle, so unless you are overriding the default storage type, what you
are doing is treating a pointer like a handle.  If you have a lot of
memory, you may be getting lucky, and only overwriting blocks that you
never use (like the pretty-printer or someting).