Alright, I have an exported class within a DLL. This class has a list of static strings, which are used in a ComboBox of a Dialog within the importing process. These strings are declared and defined as follows:
// In header:
class MYDLL_API someClass {
public:
static const string stringList[];
static const int numString;
};
// In .cpp
const int someClass::numString = 3;
const string someClass::stringList[numString] = {
"String 1",
"String 2",
"String 3"
};
So the actual exporting works fine. However, I noticed my VS 2008 debugger dumping memory which showed up as
{129} normal block at 0x003D69F0, 32 bytes long.
Data: <String 1>
etc.
So in order to determine who was leaking this memory I stopped using them in the combo Box which they were meant for and checked to see if the leak was still present, it was. So my question is, Is there some issue related to exporting a static class variable from a DLL, where it is considered a memory leak?