operator "new" returning a non-local heap pointer for only one class ?

Posted by KaluSingh Gabbar on Stack Overflow See other posts from Stack Overflow or by KaluSingh Gabbar
Published on 2010-05-12T01:23:34Z Indexed on 2010/05/12 1:34 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

Language : C++

Platform : Windows Server 2003

I have an exe calling a DLL, in which when I allocate (new) the memory for class A (which is in DLL) it returns me a non-local heap pointer.

I try to new other classes which are in DLL and "new" returns a valid heap pointer for them, its only Class A which is not being allocated properly.

I am on windows and validating the heap by this function call :

 _CrtIsValidHeapPointer ( (const void *) pPtr )

I am seriously confused why this only happens with new-ing Class A and no other class ?

(All Native Code)

© Stack Overflow or respective owner

Related posts about Windows

Related posts about heap