Friday, 25 May 2012

Possible Memory Leak. Application has passed a non-NULL pointer to RPC for an [out] parameter.


Automated Network Documentation



When calling an unmanaged method the method works correctly when targeted to a 32bit platform however crashes without error on a 64bit system when targeted to “Any CPU” or “x64”.


The following message is logged to the Application Event Log:


Possible Memory Leak.  Application (“applicationpath”) (PID: 6996) has passed a non-NULL pointer to RPC for an [out] parameter marked [allocate(all_nodes)].  [allocate(all_nodes)] parameters are always reallocated; if the original pointer contained the address of valid memory, that memory will be leaked.  The call originated on the interface with UUID ({6bffd098-a112-3610-9833-46c3f874532d}), Method number (2).  User Action: Contact your application vendor for an updated version of the application.


This error can be seen when passing a class into an managed method as an out parameter. Ensure that instead the object being passed is defined as a struct.




No comments:

Post a Comment