[haiku-bugs] Re: [Haiku] #13115: [Patch] kits/tracker/NodePreloader.cpp: fix memory leak

  • From: "Janus" <trac@xxxxxxxxxxxx>
  • Date: Thu, 22 Dec 2016 18:26:21 -0000

#13115: [Patch] kits/tracker/NodePreloader.cpp: fix memory leak
----------------------------------+----------------------------
   Reporter:  mt                  |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  Unscheduled
  Component:  Kits/libtracker.so  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  1                   |   Platform:  All
----------------------------------+----------------------------

Comment (by Janus):

 Replying to [comment:2 korli]:

Right, the delete is missing.
I'm wondering though why the if doesn't look like "if
 (!lock.IsLocked())". The "if (!lock)" form seems to only be used in
 Tracker.

 BAutolock doesn't define the `operator bool()`

 AutoLock defines it: http://cgit.haiku-
 os.org/haiku/tree/headers/private/shared/AutoLocker.h#n163

--
Ticket URL: <https://dev.haiku-os.org/ticket/13115#comment:3>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: