On 6/26/07, strk <[EMAIL PROTECTED]> wrote:
> you should have more comprehensive understandings about GC, so you > make the final decision:) Please help :) If you need more info just ask and I'll explain. Note that the current design is aimed at keeping both RC and GC an option for a quick backup solution.
OK, I do still have some questions about the GC, based on the information on wiki " Collection algorithm The algorithm will be around these lines: 1. INITIALIZATION: all managed objects are constructed in the UNREACHABLE state, no scan needed for initialization. 2. MARK SCAN: for each reachable object, if the object isn't marked as REACHABLE then mark it so and recurse. 3. CLEANUP SCAN: Release all resources which are still markes as UNREACHABLE, mark the remaining as UNREACHABLE to be ready for next scan. " In step 1, if all objects are construted as UNREACHABLE, who make them to be REACHABLE? I don't see this happen in step 2 and 3. In step2, where are the "reachable objects"? Since all objects in step1 are UNREACHABLE, after you step to step2 from step1, all objects constructed in step1 are still UNREACHABLE as I see. Answerer question one would also answer this. I just can not stop thinking about the GC algorithm intuitively in my brain like this: 1. INITIALIZATION: all managed objects are constructed in the REACHABLE state, no scan needed for initialization. 2. MARK: mark the specified object to be UNREACHABLE in the REACHABLE object list. (This is done by user) 3. CLEANUP SCAN: Release all resources which are marked as UNREACHABLE, keep the REACHABLE objects alive. These are some assumptions I made, which might lead my misunderstanding about the GC algorithm, I need your check. (1)An object is reachable means it is in a valid state and can be accessed by the user, otherwise not. (2)An object is unreachable after it is deleted or a deletion instruction be issured on it. (3)If I create a new object, of course I need it to be reachable, since I might need to use it immediately. Thanks! zou _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

