Raised This Month: $ Target: $400
 0% 

Pawn Memory


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 10-15-2009 , 21:48   Pawn Memory
Reply With Quote #1

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); }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode