Subject: bug#20220: severe memory leak on emacs 24.4.1

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 Apr 2015 17:24:01 +0300

I've looked a bit more into this problem.

A noteworthy aspect of this is that invoking w32-shell-execute like
this:

  (dotimes (i 100)
    (w32-shell-execute "open" "x:/path/to/empty.html"))

doesn't start any new threads in the context of the Emacs process,
doesn't increase its memory footprint, and therefore doesn't fail.
However, if I do this instead:

  (dotimes (i 100)
    (w32-shell-execute "open" "file:///x:/path/to/empty.html"))

then I do see the same phenomena as with browse-url-of-file.  So the
creation of extra threads is somehow triggered by using the file://
URL (which is what browse-url-of-file does).

Do you see the same on your system?

Once again, I only see all this on a single system out of 4 I tried;
the other 3 don't show extra threads, don't enlarge the Emacs memory
footprint in any significant way, and don't fail with your original
recipe.  So it appears the problem is caused by some relatively rare
conditions.