ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Freeing memory when quitting Wireshark

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 2 Aug 2011 14:04:58 -0700
On Aug 2, 2011, at 1:48 PM, Alex Lindberg wrote:

> Win32 in my case is XP + SP3.
> 
> It stays in memory (GUI or tshark version) so that when I run another compile on windows, during the copy of the exe to wireshark-gtk, the build fails with "unable to copy" message.  If I kill wireshark.exe from the task manager, all is good.

That has nothing to do with failing to free memory when the process exits; it means that, even though you asked Wireshark to quit, it hasn't finished quitting.

I.e., it "remains in memory" because it "remains in the process table as a running process", so there's no reason to expect it *not* to be in memory.

> If I build the standard WS 1.6.0, all is good, but not with my code included.

Then it's probably some code of yours that's preventing the quit from completing.

Can you attach a debugger to the process to see where it's stuck?