Solved

Memory Leaks caused in Soap Reader

Posted on 2001-08-03
5
435 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 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