#468 OLEObject - memory leak in DISP_E_EXCEPTION handling

v4.0
closed
Mark Miesfeld
Classes (182)
5
2012-08-14
2007-11-23
Mark Miesfeld
No

In OLE Automation when IDispatch::Invoke returns DISP_E_EXCEPTION the OLE object fills out an EXCEPINFO structure. Some fields in that structure are allocated BSTRs that it is the responsibility of the client (ooRexx in this case) to release.

In the current code, the BSTRs are only released when the OLE object provides a deferred fill-in function. This is incorrect, they always need to be released. Whether the OLE object allocates them immediately or defers their allocation, the net effect is the same. They are allocated by the OLE object and need to be released by the client.

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2007-11-23

    Logged In: YES
    user_id=191588
    Originator: YES

    Committed revision 1289.

     


Anonymous


Cancel   Add attachments