Solved

Memory Leaks caused in Soap Reader

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do you deal with accents and special characters in XML load to SSIS package 2 88
c# & linq 7 87
Unattended XML settings 4 102
Post xml via PHP Soap Client 3 38
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

12 Experts available now in Live!

Get 1:1 Help Now