ID 476034 - Memory/Cache clearing doesn't work in terminal mode

Follow

Problem summary
Memory/Cache clearing doesn't work in terminal mode


Using the following commands, none of them seem to clear the nuke.cacheUsage() in terminal mode

nukescripts.cache_clear()
nuke.clearDiskCache()
nuke.clearRAMCache()

nuke.clearBlinkCache()
nukescripts.clearAllCaches()

nuke.memory('free')


Customer reported version

nuke.12.1v4


Customer reported platform
centos7


Steps to reproduce


1) Create three Nuke scripts, with just a Read node pointing to different Read nodes in each script.

2) Open Command Prompt/Terminal, and launch Nuke in terminal mode, with the -t flag

3) Open the first Nuke script by running the command: nuke.scriptOpen('path/to/nuke/script.nk')

4) Close the Nuke script by running the commands:

nuke.scriptClose()
nuke.scriptClear()

5) Check the memory usage by running the command:nuke.cacheUsage()

6) Repeat steps 3-5 for the other town Nuke scripts

7) Try running any of the following commands to clear the cache/memory and checking the memory usage, none of them work:

nukescripts.cache_clear()
nuke.clearDiskCache()
nuke.clearRAMCache()

nuke.clearBlinkCache()

nukescripts.clearAllCaches()

nuke.memory('free')

Expected behaviour

For the memory usage to go down after closing/ clearing the script or when using the clear cache commands


Actual behaviour
The memory usage increases but never decreases:

​​


Workaround
Unknown. 


Reproduced by support
This bug has been reproduced in:

Nuke 13.0v2 - Windows 10, CentOS 7.5

Nuke 12.2v1 - Windows 10

Nuke 12.1v1 - Windows 10

Nuke 12.0v1 - Windows 10

Nuke 11.0v1 - Windows 10

Nuke 10.0v1 - Windows 10, CentOS 7.5 * Still happens but scriptClose and scriptClear do a better job of clearing memory, but it still increases slowly between script opens and the other commands don't reduce this


Unable to reproduce bug in:

Nuke 9.0v9 - Windows 10


Earliest version tested
Nuke 9.0v9 - This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why