I'm working with large strings. I read information from a file, and place it into a 2D array. (About 15 total strings). I know nothing about memory, (besides how statics work and such). My question is, below is two functions. I'm using the first one. When the function is done, is all that memory free'd up? If not, wouldn't it be better to use the second one?
Code:
#include <amxmodx>
#include <cellarray>
new Array:g_FinalString
public plugin_init()
g_FinalString = ArrayCreate();
Function()
{
new largeString[15][1024]
for(new Count;Count < 14;Count++)
formatex(largeString[Count],1023,"Random String");
// Copy "largeString" to the "g_FinalString"
}
Function()
{
new Array:LargeString = ArrayCreate();
ArrayPushString(LargeString,"Random String");
// Copy "largeString" to the "g_FinalString"
ArrayDestroy(LargeString);
}
__________________