billroper: (Default)
[personal profile] billroper
It appears that we have a big memory leak in our application. Some of it is my fault, because I copied incorrectly working code without bothering to check how a particular class worked.

Short form: our COM routines return a BSTR. If you assign that BSTR value to an object of the CComBSTR class, the value is copied to the internal storage for the class instead of being attached to the internal storage. So if you were counting on the BSTR being cleaned up when the CComBSTR object went out of scope, well, you were right for one out of two strings.

*shudder*

The solution is to call the Attach method for the CComBSTR class so that it takes ownership of the pointer.

And happily, I figured this out before code freeze.

Now we just need to fix all of the places that are doing it wrong.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

billroper: (Default)
billroper

February 2026

S M T W T F S
1 2 3 4 5 6 7
891011121314
15161718192021
22232425262728

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 9th, 2026 10:05 pm
Powered by Dreamwidth Studios