EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Correct way for release TElHTTPSClient object

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 09/05/2016 04:18:08
by shawn jun (Basic support level)
Joined: 04/12/2016
Posts: 9

I've setup a simple testing for periodically create a TElHTTPSClient object in a Timer, and access a https url, finally Close(true) it by following your sample code, by monitoring the Memory counter (Virtual Memory and WorkingSet) for this process, I can see these counters keep rising and getting over 10 times than initial values (it will grows more if test lasting).
Later I add the Dispose() call besides the 'Close(true)', those 2 counters are getting fine.
And I noticed there're another function of 'Destroy()', did I need to call this as well?

key code for testing:

private TElHTTPSClient HTTPSClient = null;
        private void timer1_Tick(object sender, EventArgs e)
                HTTPSClient = new SBHTTPSClient.TElHTTPSClient();
                // Client Only Production Key
                SBUtils.Unit.SetLicenseKey("XXXXX omit here XXXXXX");
                HTTPSClient.OnData += new SBSSLCommon.TSBDataEvent(HTTPSClientOnData);

                string url = "https://www.msn.com/";
                int res = HTTPSClient.Get(url);

            catch (Exception ex)
                // adding by my guess
                // did i need call this as well?
                // HTTPSClient.Destroy();

        private void HTTPSClientOnData(object Sender, byte[] buffer)

        static void Main(string[] args)

VERSION we used:
SecureBlackbox.HTTP, Version=, Culture=neutral, PublicKeyToken=5a62fa96d0ac43

Regarding the support ticket, our company might lost the registration email, and Only I can provide is the license key, does that help?
Posted: 09/05/2016 04:22:03
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Calling Dispose after Close is enough to free allocated memory correctly.



Topic viewed 133 times



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!