5 Replies Latest reply on Nov 26, 2007 2:26 AM by Tal_CS

    Is member.erase() good for dynamic delete of objects/members?

    Tal_CS Level 1

      after creating a few members dynamically at runtime ( _movie.newmember(#text)), they accumulate at the cast. I want to erase/delete them, to prevent memory problems in complex instances of the application, but the Director Reference/Help warns of using member.erase() at run-time:


      For best results, use this method during authoring and not in projectors. Using this method in projectors may cause memory problems.

      So, should I use it, or should I count on the user memory capacity to withstand the... ~100 objects (approximation) that will be created at runtime?

      PS: When I try to remove the member from the cast library at run-time, when I'm done with the member, the cursor turns to a rotating sandwatch for a few seconds. I wonder why, and how much CPU that takes (tested at the Director IDE).