Top "Self-destruction" questions

Self destruction is a procedure or algorithm that is programmed to destroy the caller object, or the invoker file or pointer.

Is delete this allowed?

Is it allowed to delete this; if the delete-statement is the last statement that will be executed on that instance …

c++ memory-management new-operator delete-operator self-destruction
Self deletable application in C# in one executable

Is it possible to make an application in C# that will be able to delete itself in some condition. I …

c# .net self-updating self-destruction
How to make scripts auto-delete at the end of execution?

Is it possible to make a python script that will delete the .py file at the end of its execution (…

python windows self-destruction
Is it safe to `delete this`?

In my initial basic tests it is perfectly safe to do so. However, it has struck me that attempting to …

c++ runtime-error self-destruction
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
How can I make my .NET application erase itself?

How can I make my C# app erase itself (self-destruct)? Here's two ways that I think might work: Supply another …

c# .net windows delete-file self-destruction
PHP file that should run once and delete itself. Is it possible?

Is it possible to create a PHP file that runs once with no errors and deletes itself?

php file self-destruction
Self-destructing application

Along the lines of "This tape will self-destruct in five seconds. Good luck, Jim"... Would it be possible for an …

java desktop-application self-destruction
"delete this" in constructor

What actually happen when I execute this code? class MyClass { MyClass() { //do something delete this; } }

c++ constructor destructor delete-operator self-destruction
Self deleting bash script

How can a bash script execute even after encountering a statement to delete itself? For eg when I ran test.…

bash self-destruction