Memory leak on ADT Arrays
Hey, i'm having an issue with an ADT Array, which stores another ADT array.
The following piece of code is giving me memleaks and i'm not sure what else to try. Code:
Code:
OnMapEnd {Anyone got any idea on how to do this? It's driving me nuts and i'd have to refactor a fair amount of code to approach it on another way. Thanks in advance. |
Re: Memory leak on ADT Arrays
You should delete all handles manually in your g_bulkNotLoadedClientsArray array.
I mean, delete tempArray which you pushed on setClientsArray(). |
Re: Memory leak on ADT Arrays
If the variable "i" is another handle, you need to manually close that too. Then close each arraylist manually.
E.g. Code:
for (int i = 0; i < g_bulkNotLoadedClientsArray.Length; i++) |
Re: Memory leak on ADT Arrays
Quote:
Hey, yeah, that's what i've tried to do when I said I tried iterating over the bulk array, however, doing this for some reason generates even more ArrayCell leaks. |
Re: Memory leak on ADT Arrays
You probably need to post your code.
|
Re: Memory leak on ADT Arrays
And dem logs showing you the array leaks.
|
Re: Memory leak on ADT Arrays
Quote:
Code:
|
Re: Memory leak on ADT Arrays
I meant all of it, at least concerning the handles. That'd include handle creation, closing, and also anywhere you put things into your array.
|
Re: Memory leak on ADT Arrays
Honestly you should just avoid putting an ArrayList within another ArrayList, sounds like a headache to deal with (something you've already started to have)
|
Re: Memory leak on ADT Arrays
Sometimes its easier to work with pre-allocated array.
|
| All times are GMT -4. The time now is 13:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.