Welcome Guest. Please Login or Register. Apr 6th, 2018, 12:20am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
DIM text% LOCAL 255 makes the allocated memory local, i.e. it allocates it from the stack rather than from the heap.
As they both work, and I would assume that they are both acceptable, why would you rather have the memory allocated from the stack? Is there a potential problem, or is just good practice?
Is there a potential problem, or is just good practice?
There's a massive potential problem - a memory leak! As a rule you never have a choice of when to allocate memory from the heap or the stack; for example if you're allocating memory inside a PROC or FN it will generally be essential to allocate it from the stack. A memory leak is the very last thing you want because it's so insidious - it may not be noticed until your program eventually crashes maybe days or months later!