Hi, I've got some problem that I can't figure out why it would "do this" that way...
I have a pointer in a class that I initialize in a constructor, then insde a member function, I allocate to that pointer some 100k of memory. Then I put a destructor with code for releasing that memory, but it fails to delete the pointer... I tried things and I figured out that the operator "delete" would work properly when I placed it in the SAME function where it was allocated with "new"...

Code:
class abc {
	public:
		int a*;
		abc() {
			a = 0;
		}
		func() {
			a = new int[100000];
			//do stuff...
		}
		~abc {
			delete[] a;
		}
};

But what is wrong with all this? Delete is supposed to work everywhere as long as we have our pointer allocated to something... But I get errors, and while debugging (MSVC), I tried to move the "cursor" right after "a" was allocated, to the line of code inside the destructor to delete a, but not only didn't it deallocated my pointer, but it took even more memory on my RAM . Can someone here help with this strange behaving?