Free resources associated with a search?

Plug-in and third party software discussion.
Post Reply
vfatica
Posts: 50
Joined: Thu May 21, 2015 7:06 pm

Free resources associated with a search?

Post by vfatica »

I modified dll.test.c to search for L"*" and to hang around for a while after the search. When the sample EXE started, its working set was about 3MB. After the search, its working set was about 32MB. Is there a way to free that memory?

Thanks.

- Vince
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Free resources associated with a search?

Post by void »

The memory is freed after you perform another search or call Everything_Reset
vfatica
Posts: 50
Joined: Thu May 21, 2015 7:06 pm

Re: Free resources associated with a search?

Post by vfatica »

void wrote:The memory is freed after you perform another search or call Everything_Reset
I can't find Everything_Reset in the header, LIB, or DLL.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Free resources associated with a search?

Post by void »

The SDK has been updated to include Everything_Reset in the headers, dll and libraries.
vfatica
Posts: 50
Joined: Thu May 21, 2015 7:06 pm

Re: Free resources associated with a search?

Post by vfatica »

That was fast! Thanks. Indeed, it works.

- Vince
Gisle Vanem
Posts: 34
Joined: Mon May 04, 2015 10:30 am

Re: Free resources associated with a search?

Post by Gisle Vanem »

Maybe Everything_Reset() should also call TerminateThread() if the
_Everything_thread_proc() is still alive at that point?
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Free resources associated with a search?

Post by void »

_Everything_thread_proc() should only run inside the _Everything_Query() call.
The thread _Everything_thread_proc will close before _Everything_Query() returns.


Note: No thread is created if you set bWait to FALSE in _Everything_Query().
Post Reply