"de-allocating" variables during run-time
davejames
Posts: 4,047
Hi All,
I'm kinda running out of variables in my BS2-oriented project and am wondering if there is a way to de-allocate a variable used in one portion of the program, and then use the freed space for a variable in another portion of the program?
Did that make sense?
I'm gonna guess "no" as maybe the Tokenizer needs to know about all variables up-front when it does the memory allocation. But, I thought I'd ask.
I'm kinda running out of variables in my BS2-oriented project and am wondering if there is a way to de-allocate a variable used in one portion of the program, and then use the freed space for a variable in another portion of the program?
Did that make sense?
I'm gonna guess "no" as maybe the Tokenizer needs to know about all variables up-front when it does the memory allocation. But, I thought I'd ask.
Comments
In this case, Name1 and Name2 share the same variable space, since Name2 is an "alias" for Name1. You just have to be careful that both aliases do not require the space at the same time.
-Phil
AWESOME! That's the ticket. :thumb:
Caveat noted and understood.
Thanks Mr. Pilgrim!