EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Memory leak for SBHTTPSClient.TElHTTPSClient

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#37531
Posted: 08/23/2016 06:49:36
by shawn jun (Basic support level)
Joined: 04/12/2016
Posts: 9

Hi,
we've setup a simple testing and could see the memory keep rising, could you help?

the attachment is the encapsulation of the HttpSecureBlackbox, and the below code the is caller side via a timer in Windows Form application:

Code
     private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                timer1.Stop();
                textBox1.Text = "Stop ...";

                string url = "https://www.msn.com/";
                var xmlDoc = new XmlDocument();
                var instance = new HTTPBlackbox();
                var xmlStr = new StringBuilder();

                instance.HttpsRequestXmlDocument(url, ref xmlStr);
                //xmlDoc.LoadXml(xmlStr.ToString());

                textBox1.Text = "Start";
                timer1.Start();
            }
            catch (Exception ex)
            {
                Trace.WriteLine("In function WebRequestXmlDocument, exception occured, detail: " + ex.ToString());
                //MessageBox.Show(ex.ToString());
                timer1.Start();
            }


[ Download ]
#37535
Posted: 08/23/2016 07:34:39
by Eugene Mayevski (EldoS Corp.)

The term "leak" is inappropriate here, as we are talking about managed environment with automatic garbage collection.

There are indeed some global objects allocated. The rule of thumb is to call .Dispose() on all components which you dynamically allocate. But your code doesn't show at all, how you are using the component, so I can't comment any further.

Finally, I’ve noticed there is no support access ticket linked to your user account on EldoS site. Support is provided to customers with the linked support access tickets. You will find your support access ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.


Sincerely yours
Eugene Mayevski
#37541
Posted: 08/23/2016 09:25:43
by shawn jun (Basic support level)
Joined: 04/12/2016
Posts: 9

I just left company for rush and missed some info here.
The memory is rising so fast and obvious, I noticed this by just looked the Virtual Memory and WorkingSet in Windows Task Manager, the testing lasted less than a hour, but the memory usage was over 10 times than the initial value, and still rising.
I believe this is not a GC issue, otherwise, the memory would drop after a while.
And further more, I've always called:
Code
HTTPSClient.Close(true)

for every instance in a finally statement.

I'll create the ticket maybe later since I'm not in office for now, but I'm sure we're the paying customer of yours.

Thanks!

Reply

Statistics

Topic viewed 207 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!