title: Ignite doesn't free memory after cache destroy
body: <p>I'm using Ignite engine as a bean inside a Spring boot web application. The cache configuration is as follows:</p>
  
  <pre><code>&lt;bean id="ignite" class="org.apache.ignite.IgniteSpringBean"&gt;
  &lt;property name="configuration"&gt;
      &lt;bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
          &lt;property name="cacheConfiguration"&gt;
              &lt;list&gt;
                  &lt;bean class="org.apache.ignite.configuration.CacheConfiguration"&gt;
                      &lt;property name="atomicityMode" value="TRANSACTIONAL" /&gt;
                      &lt;property name="cacheMode" value="PARTITIONED" /&gt;
                      &lt;property name="backups" value="0" /&gt;
                      &lt;property name="startSize" value="#{1024*16}" /&gt;
                      &lt;property name="memoryMode" value="OFFHEAP_TIERED" /&gt; 
                      &lt;property name="offHeapMaxMemory" value="#{1 * 1024L * 1024L * 1024L}" /&gt;
                      &lt;property name="swapEnabled" value="true" /&gt;
                      &lt;property name="evictSynchronized" value="true" /&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
  
  
          &lt;property name="swapSpaceSpi"&gt;
              &lt;bean class="org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi"&gt;
                  &lt;property name="baseDirectory" value="..." /&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
  </code></pre>
  
  <p>Here is the default memory usage after I start the engine with 0.5GB heap:
  <a href="https://i.stack.imgur.com/wiQoc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wiQoc.png" alt="enter image description here"></a></p>
  
  <p>Now at this point I'm expecting the maximum memory usage to be 2.6 GB since I set the off-heap max memory to 1 GB. But here is what happens after I load some million objects into cache!
  <a href="https://i.stack.imgur.com/EwMnw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EwMnw.png" alt="enter image description here"></a></p>
  
  <p>What's even worse is, I destroy the cache but the memory usage is still there!
  <a href="https://i.stack.imgur.com/INRId.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/INRId.png" alt="enter image description here"></a></p>
  
  <p>At this point if I try to load more entries into cache, the memory usage just keeps growing, proving that ignite didn't free the cache I destroyed earlier.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I uploaded a maven test project along with my output to <a href="http://sourceforge.net/projects/ignitetest35087485/files/" rel="nofollow noreferrer">http://sourceforge.net/projects/ignitetest35087485/files/</a>. As you will see, it depleted my memory after 5 cycles of load-destroy. Eviction to swap space did not take place and ignite didn't take the offHeapMaxMemory setting into account.</p>
  
  <p>What is the problem here? Any help is much appreciated.</p>