AnsweredAssumed Answered

How to delete memory-workspace

Question asked by Pradakasten on Apr 2, 2020
Latest reply on Apr 7, 2020 by Pradakasten

Hello,

 

how can I delete the memory-workspace after a script has run?

I usually added

arcpy.Delete_management("memory")

to the end of my scripts, but noticed yesterday that this apparently doesn't do anything. 

The workaround i found is to loop over all fc in the workspace and delete them one by one.

for fc in arcpy.ListFeatureClasses():
    desc = arcpy.Describe(fc)
    arcpy.Delete_management(desc.catalogPath)

But this help site indicates it should be possible to delete all at once.

Write geoprocessing output to memory—ArcGIS Pro | Documentation 

Also, the older in_memory seems to empty itself after a script ran, why doesn't memory do the same?

 

Cheers

 

edit: I am using ArcGIS Pro 2.4.3

Outcomes