Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80368

Use RAII for resource management in QSslSocket (and its backends)

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • P2: Important
    • Resolution: Fixed
    • None
    • 6.x
    • Network: SSL
    • None
    • All
    • 21

    Description

      At the moment our QSslSocket's backends contain a lot of manual memory/resources management (it's not about new/delete, it's about platform/framework specific functions allocating some resource and the complement 'releasing' functions. This is very bug/error prone, every time somebody feels urge to introduce a new piece of code, they leak resources in a scenario like this:

      if (somethingFailed) {
         qCWarning(lcSsl, "something failed");
         return; // no q_XXX_free()... etc.
      } 

      Also, we can use RAII in private backend classes (instead of naked pointers) wherever possible.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            tpochep Timur Pocheptsov
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes