Leaked objects in debug mode


#1

Hi all,

When I am running my project in debug mode in Visual studio, some leaked objects of class StringArray were left in the memory.
This is not happend when I am running in release mode either into Visual studio environment, or inside the command prompt window.

Is there any issue about this? 

Thanks in advance

George


#2

Leaks aren't reported in a release build.

If it's only StringArrays then most likely you're doing something silly like using static StringArrays somewhere.


#3

No, I have no static StringArrays somewhere.

The only I have is, StringArrays inside a structure, which is declared inside a class.

 


#4

An old thread that could help ( http://www.juce.com/forum/topic/leak-detector-and-static-variables ).


#5

Ι accidentally did not delete the class. 

Now all is going ok.

But, a question is remaining to me, just for the completeness of this issue:  Why the leak detector handles the class and its objects (StringArrays) separately?

Thanks for the attention

George

 

 


#6

The leak detection is a juce feature, not something that the OS or compiler adds - it can only work on classes where you explicitly add the JUCE_LEAK_DETECTOR macro.