<p dir="auto">It seems that provided code example leaks memory on numpy 1.16.0. This can be observed via top or htop while the program executes. The same code with numpy 1.15.4 has stable memory footprint.  I couldn't isolate the problem without multiprocessing.</p>
<p dir="auto">I've reproduced the same behavior on Ubuntu and MAC OSX on python versions 3.6.5_1, 3.6.8, 3.7.2.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from multiprocessing import Pool, get_context


def f(x):
    return x + 2


a = map(lambda x: np.array([]), range(int(10e6)))

if __name__ == '__main__':
    print(&quot;Numpy version: &quot;, np.version.version)
    with Pool(4) as pool:
        k = pool.imap_unordered(f, iter(a))
        for i in k:
            pass"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">from</span> <span class="pl-s1">multiprocessing</span> <span class="pl-k">import</span> <span class="pl-v">Pool</span>, <span class="pl-s1">get_context</span>


<span class="pl-k">def</span> <span class="pl-en">f</span>(<span class="pl-s1">x</span>):
    <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">2</span>


<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-en">map</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">np</span>.<span class="pl-en">array</span>([]), <span class="pl-en">range</span>(<span class="pl-en">int</span>(<span class="pl-c1">10e6</span>)))

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
    <span class="pl-en">print</span>(<span class="pl-s">"Numpy version: "</span>, <span class="pl-s1">np</span>.<span class="pl-s1">version</span>.<span class="pl-s1">version</span>)
    <span class="pl-k">with</span> <span class="pl-v">Pool</span>(<span class="pl-c1">4</span>) <span class="pl-k">as</span> <span class="pl-s1">pool</span>:
        <span class="pl-s1">k</span> <span class="pl-c1">=</span> <span class="pl-s1">pool</span>.<span class="pl-en">imap_unordered</span>(<span class="pl-s1">f</span>, <span class="pl-en">iter</span>(<span class="pl-s1">a</span>))
        <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-s1">k</span>:
            <span class="pl-k">pass</span></pre></div>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import pickle
import os
import itertools
import psutil
import gc
import sys

print ('NumPy version:', np.__version__, 'Python version:', sys.version)
for i in itertools.count():
    pickle.dumps(np.zeros(1024*1024))
    gc.collect()
    if i % 100 == 0:
        info = psutil.Process(os.getpid()).memory_info()
        print(f'vms={info.vms/1024/1024}MB rss={info.rss/1024/1024}MB')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">pickle</span>
<span class="pl-k">import</span> <span class="pl-s1">os</span>
<span class="pl-k">import</span> <span class="pl-s1">itertools</span>
<span class="pl-k">import</span> <span class="pl-s1">psutil</span>
<span class="pl-k">import</span> <span class="pl-s1">gc</span>
<span class="pl-k">import</span> <span class="pl-s1">sys</span>

<span class="pl-en">print</span> (<span class="pl-s">'NumPy version:'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">__version__</span>, <span class="pl-s">'Python version:'</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-s1">itertools</span>.<span class="pl-en">count</span>():
    <span class="pl-s1">pickle</span>.<span class="pl-en">dumps</span>(<span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">1024</span><span class="pl-c1">*</span><span class="pl-c1">1024</span>))
    <span class="pl-s1">gc</span>.<span class="pl-en">collect</span>()
    <span class="pl-k">if</span> <span class="pl-s1">i</span> <span class="pl-c1">%</span> <span class="pl-c1">100</span> <span class="pl-c1">==</span> <span class="pl-c1">0</span>:
        <span class="pl-s1">info</span> <span class="pl-c1">=</span> <span class="pl-s1">psutil</span>.<span class="pl-v">Process</span>(<span class="pl-s1">os</span>.<span class="pl-en">getpid</span>()).<span class="pl-en">memory_info</span>()
        <span class="pl-en">print</span>(<span class="pl-s">f'vms=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">info</span>.<span class="pl-s1">vms</span><span class="pl-c1">/</span><span class="pl-c1">1024</span><span class="pl-c1">/</span><span class="pl-c1">1024</span><span class="pl-kos">}</span></span>MB rss=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">info</span>.<span class="pl-s1">rss</span><span class="pl-c1">/</span><span class="pl-c1">1024</span><span class="pl-c1">/</span><span class="pl-c1">1024</span><span class="pl-kos">}</span></span>MB'</span>)</pre></div>
<h3 dir="auto">Output on NumPy 1.15.4</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NumPy version: 1.15.4 Python version: 3.6.3 (default, Nov 23 2017, 18:55:59) 
[GCC 5.4.0 20160609]
vms=434.71875MB rss=27.421875MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB"><pre class="notranslate"><code class="notranslate">NumPy version: 1.15.4 Python version: 3.6.3 (default, Nov 23 2017, 18:55:59) 
[GCC 5.4.0 20160609]
vms=434.71875MB rss=27.421875MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
vms=434.72265625MB rss=27.52734375MB
</code></pre></div>
<h3 dir="auto">Output on NumPy 1.16.0</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python test.py
NumPy version: 1.16.0 Python version: 3.6.3 (default, Nov 23 2017, 18:55:59) 
[GCC 5.4.0 20160609]
vms=431.58984375MB rss=27.34765625MB
vms=1239.5859375MB rss=827.47265625MB
vms=2039.58984375MB rss=1627.4765625MB
vms=2839.58984375MB rss=2427.4765625MB
vms=3639.59375MB rss=3227.4921875MB
vms=4439.59375MB rss=4027.5078125MB
vms=5239.59375MB rss=4827.51953125MB
vms=6039.59765625MB rss=5627.5390625MB"><pre class="notranslate"><code class="notranslate">$ python test.py
NumPy version: 1.16.0 Python version: 3.6.3 (default, Nov 23 2017, 18:55:59) 
[GCC 5.4.0 20160609]
vms=431.58984375MB rss=27.34765625MB
vms=1239.5859375MB rss=827.47265625MB
vms=2039.58984375MB rss=1627.4765625MB
vms=2839.58984375MB rss=2427.4765625MB
vms=3639.59375MB rss=3227.4921875MB
vms=4439.59375MB rss=4027.5078125MB
vms=5239.59375MB rss=4827.51953125MB
vms=6039.59765625MB rss=5627.5390625MB
</code></pre></div>