Solved

Memory Leaks caused in Soap Reader

Posted on 2001-08-03
5
416 Views
Last Modified: 2008-02-26
Hi,

I've discovered that my application leaks memory when I make the following call:

   ISoapReaderPtr pReader;  
   hr = pReader.CreateInstance(__uuidof(SoapReader));

I am using the latest Soap libraries from Microsoft, but I haven's seen or heard any reports of memory leaks in the latest release.

I must have a solution to this problem, because my application runs non-stop as a Windows NT service, and of course, it can't leak any memory.

Thanks,
0
Comment
Question by:carlpaddick
5 Comments
 
LVL 27

Accepted Solution

by:
BigRat earned 100 total points
ID: 6351312
May I first ask (excuse me for being stupid) whether you have called CoInitialize before starting any work.

I see that you got the code from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/soap/htm/soap_sam_lowlevelapi_0ajp.asp where surprisingly one seems to just call the static method CreateInstance and not the "old" way via the COM API ::CoCreateInstance.

This does surprise me since one is strongly advised NOT to do this with MTS components (at least on Window NT 4.0).

There could well be a bug in the component. If the bug is related to factory class construction you might try to create the reader via ::CoCreateInstance instead.

HTH
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6789963
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.
____________________________________________
---------->  Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

------------->  The ALL TOPICS link has been updated today to reflect all the new TAs.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6946882
<review>

<recommendation>
delete question
</recommendation>

<objection>
any objection should be raised within 7 days
</objection>

<reviewer>
b1xml2
</reviewer>

</review>
0
 

Author Comment

by:carlpaddick
ID: 6947209
This question has been outstanding for nearly a year now, and in a way BigRat, your answer works to a point - it has cleared up some of the memory leaks.  However since then I have found that there does seem to be memory leaks within Microsoft's Soap itself, and until they fix it, there's obviously nothing we can do.

Thanks for the reply and please have the points.

Carl
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6947312
carlpaddick,

thank you for your closing comments and finalising the question as well as indirectly explaining the B grade.

have a good one =)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now