This is an old bug in Director. Duplicate, obviously, would use more
memory - the bug is really that erase doesn't free memory. Even if
allocating from an Xtra, it's still a problem.
It really depends on how long you expect to be up and running, and how many
of these calls you make. A small quantity won't be the end of the world,
but large amounts over time will create problems (depending on the machine).
The problem is more prevalent on the Mac, which has crappy memory
management (to use the technical term). There, memory fragments really
easily. Windows, particularly nowadays, is much better.
If you update the same text member you'll probably do better than
erasing/replacing. Text doesn't chew up much space though. The problem is
more prevalent with bitmaps.
- Tab
At 11:04 PM 6/1/01 -0400, Slava Paperno wrote:
>MM docs (for D8) warn that the commands member.erase() and
>member.duplicate(), if used at run time, may lead to memory problems. I
>suppose this is because when members are erased(), the memory space they
>occupy is not released.
>
>I'm using both commands for storing user's work at run time (creating text
>members). I check baMemoryInfo("max block") to warn the user about
>potential memory problems. Is that the best I can do (other than trying to
>save the user's work in rtf-formatted text files or something)? Or is
>there a safer way to duplicate and erase cast text members?
>
>Thanks!
>
>Slava
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]