Top "Resource-cleanup" questions

How to delete all files older than 3 days when "Argument list too long"?

I've got a log file directory that has 82000 files and directories in it (about half and half). I need to …

linux file-io resource-cleanup
Powershell - "Clear-Item variable:" vs "Remove-Variable"

When storing text temporarily in powershell variables at runtime, what is the most efficient way of removing a variables contents …

powershell resource-cleanup
Automate process of Disk Cleanup cleanmgr.exe without user intervention

I am developing a powershell script file which shall execute some disk cleanup without user intervention. The user shall not …

powershell registry powershell-3.0 resource-cleanup
If I set a variable using `CreateObject()`, do I need to clean it up by setting it to `Nothing` after use?

If I set a variable using CreateObject(), do I need to clean it up by setting it to Nothing after …

vbscript resource-cleanup
How can I get around the lack of a finally block in PHP?

PHP prior to version 5.5 has no finally block - i.e., whereas in most sensible languages, you can do: try { //…

php exception resource-cleanup
Should objects delete themselves in C++?

I've spent the last 4 years in C# so I'm interested in current best practices and common design patterns in C++. …

c++ oop memory-management resource-cleanup self-destruction
Right way to close CloseableHttpResponse/CloseableHttpClient

I'm using CloseableHttpResponse (from apache-httpclient-4.5.3) and I'm not sure I'm using it right, I saw an answer with no votes …

java apache-httpclient-4.x resource-cleanup autocloseable
Multiple defers vs deferred anonymous function

Is it safer or more idiomatic to issue multiple defer statements which are dependent on the order, or to defer …

go resource-cleanup
Clean up Threejs WebGl contexts

I have a problem while cleaning up my WebGl-Scenes. I'm using Three.js with a WebGlRenderer. In my application I …

three.js webgl renderer resource-cleanup
How to clean node_modules folder when prepping for deployment

How would I go about cleaning the node_modules folder when prepping my code for deployment. I am making an …

node.js npm node-modules resource-cleanup