Memory leaks with BSTR
-
Hi all, I'm facing a big problem with strings in ATL component. it need to append to same string in a function. that CComBSTR object is passed to a function by reference which appends some data to it. but in appending steps at certain stages it show increase in memory usages. Is this memory leak. how to work around this problem. thanks, Prasad
-
Hi all, I'm facing a big problem with strings in ATL component. it need to append to same string in a function. that CComBSTR object is passed to a function by reference which appends some data to it. but in appending steps at certain stages it show increase in memory usages. Is this memory leak. how to work around this problem. thanks, Prasad
-
Can you specify how you determined memory usage has increased ? Also check whether this link has something to say.INFO :q139071
There is no spoon. mailin my component there is memory leak. when i was debugging application, i found in task manager that append statement of CComBSTR causes some increase in memory usage
-
in my component there is memory leak. when i was debugging application, i found in task manager that append statement of CComBSTR causes some increase in memory usage
I'm sure someone else will point this out... An increase in memory usage is not necessarily an indication that the program leaks memory. CComBSTR may use temporary heap space while it does the append operation. This may cause a change in the memory size of your app. When the memory is freed (via delete or free) this is not necessarily reflected immediately by the memory being marked as free from the OS point of view. If you do repeated appends (say, 1000 in a loop), and it still increases, that may be a better indication. Steve S Developer for hire