octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54882] fail to build with Qt 4.8: class QPoin


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #54882] fail to build with Qt 4.8: class QPointer<> has no member named 'clear'
Date: Tue, 23 Oct 2018 16:25:56 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Update of bug #54882 (project octave):

                  Status:                    None => Patch Submitted        

    _______________________________________________________

Follow-up Comment #1:

It seems to me that simply deleting the call to 'clear' might also work,
because the QPointer goes out of scope with the next line of code anyway, so
the object it points to should be deleted implicitly.

So the following change should also be acceptable


--- a/libgui/src/octave-cmd.cc
+++ b/libgui/src/octave-cmd.cc
@@ -177,8 +177,6 @@ namespace octave
 
             cmd_gp->execute (interp);
           }
-
-        cmd_gp.clear ();    // remove the original cmd pointer
       }
 
     if (repost)  // queue not empty, so repost event for further processing


I've tested both of these and I don't see any ill effects, but since this is
about memory management I'm not really sure that I can see any. I would really
appreciate some feedback from someone who understands the ownership of the
command queue and the command objects on the queue, or suggestions as to how
to test whether either of these changes are safe.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54882>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]