Thank you very much for taking the time to write this answer. I found the same bug in Dissolve_management and it wasted a lot of my employer's time. The insidious semi-random nature of these memory management bugs makes them extremely difficult to debug because setting up a test case that fails reliably is difficult. Your solution of running in a separate process is the only thing I found that worked (and like you I tried many other things). For me there is an overhead of about 6 seconds per extra process call while the other process imports arcpy, but it is at least a solution! I also found 32-bit background geoprocessing more reliable than 64-bit (which is simply broken for me). Now I just call all geoprocessing tasks in their own separate processes (like clip and erase). You can't use Feature Layers this way so it takes a little longer to write anything into a Feature Class but I choose reliability over speed any time. This sort of bug can really hurt your professional reputation if you are required to perform some ostensibly simple tasks for a tight deadline. They should not still be in the wild.
... View more