#11934: [PATCH] Solve memory leaks in Deskbar and some replicants. ------------------------------+---------------------------- Reporter: Barrett | Owner: stippi Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: User Interface | Version: R1/Development Resolution: | Keywords: Deskbar Blocked By: | Blocking: Has a Patch: 1 | Platform: All ------------------------------+---------------------------- Comment (by anevilyak): Patch 2 is broken in several ways: {{{ - BMessage archivedView; - if (message->FindMessage("view", &archivedView) == B_OK) { + BMessage* archivedView = NULL; + if (message->FindMessage("view", archivedView) == B_OK) { }}} This code was correct before, FindMessage() expects a pointer to an already allocated message object, which the code was doing just fine prior to this change. Consequently, the following code is also passing around and deleting a NULL pointer. The change in BShelf is similarly broken. The ProcessController and Volume Control patches are correct, but unlikely to be the culprits behind any real leaks, since the ProcessController code in question is only invoked when run as a standalone app, and even then only once (ReadyToRun() is only called at startup). Likewise, the VolumeControl code in question is only called when initially instantiating the replicant, and as such can't really be responsible for any extended leaks. The TimeView change is correct, but the same situation applies, since it's only invoked when opening the preferences via the context menu. As such, I really don't see how these patches fix any major memory leak issues with Deskbar. -- Ticket URL: <https://dev.haiku-os.org/ticket/11934#comment:4> Haiku <https://dev.haiku-os.org> Haiku - the operating system.