in reply to Re^5: Techniques On Saving Memory
in thread Techniques On Saving Memory
Hmmm. Classic example of how things that are clear in your mind don't make any sense to anyone else because you assume they know what you are thinking. By faking the closure, I mean get the same effect - causing the reference count to increase by one so when it goes out of scope it doesn't reach 0.
To avoid that, you would need to keep a copy of the unsmashed reference around. To do that, you need to put it somewhere:
This is the exact thing I am proposing you don't have to do. It is in scope at the time you are stringifying it. If the only thing (which is my understanding) that is keeping it from being GC'd when it goes out of scope is the reference count - just increase it. You use the stringified address to look it up later, you GC it by lowering the ref count.
If the idea isn't clear (forget workable for now) then let me know and I will try a non-commentary approach.
Cheers - L~R
P.S. I didn't indicate that XS wouldn't be required though it would be really cool if it wasn't.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Techniques On Saving Memory
by BrowserUk (Patriarch) on Mar 09, 2005 at 23:43 UTC | |
by Limbic~Region (Chancellor) on Mar 09, 2005 at 23:52 UTC | |
by BrowserUk (Patriarch) on Mar 10, 2005 at 00:45 UTC |