self-destruction Questions
6
Solved
Is it possible to make a python script that will delete the .py file at the end of its execution (self-delete) in windows?
Eldwin asked 11/4, 2012 at 19:27
11
Solved
How can I make my C# app erase itself (self-destruct)? Here's two ways that I think might work:
Supply another program that deletes the main program. How is this deleter program deleted then, tho...
Kukri asked 11/2, 2010 at 14:49
4
Solved
Is it possible to create a PHP file that runs once with no errors and deletes itself?
Boneset asked 5/4, 2010 at 14:57
2
I found this repo describing HOW to destroy a service worker. But I didn't find any resources describing WHEN a worker should destroy/uninstall/unregister itself.
When I develop websites, I often ...
Fashionable asked 30/12, 2019 at 9:55
3
Solved
What actually happen when I execute this code?
class MyClass
{
MyClass()
{
//do something
delete this;
}
}
Sanctum asked 14/3, 2011 at 19:44
4
Solved
Along the lines of "This tape will self-destruct in five seconds. Good luck, Jim"...
Would it be possible for an application to delete itself (or it's executable wrapper form) once a preset time o...
Nickname asked 11/4, 2012 at 14:28
7
Solved
Is it possible to make an application in C# that will be able to delete itself in some condition.
I need to write an updater for my application but I don't want the executable to be left after the...
Malady asked 20/8, 2009 at 11:6
10
Solved
Is it allowed to delete this; if the delete-statement is the last statement that will be executed on that instance of the class? Of course I'm sure that the object represented by the this-pointer i...
Auxin asked 30/6, 2010 at 15:45
10
Solved
In my initial basic tests it is perfectly safe to do so. However, it has struck me that attempting to manipulate this later in a function that deletes this could be a runtime error. Is this t...
Albumenize asked 15/2, 2009 at 2:25
2
Solved
I have an uninstall script that cleans up an add-on tool used with an application.
Versions of the script run on both Windows and Linux.
I'd like to be able to delete the uninstall script file and...
Canny asked 25/8, 2011 at 23:14
7
Solved
Suppose there's a vector of Items
vector<Item*> items; //{item1, item2, item3}
Then, in other part of the code,
items[1]->suicide();
where the suicide function is:
void Item::suici...
Kelsi asked 10/6, 2013 at 8:31
5
Solved
Is it possible to write a program in C that upon execution deletes itself (the binary) and then terminates successfully. If so, what's the easiest way of doing this?
Hubing asked 1/4, 2012 at 14:32
2
Solved
How can a bash script execute even after encountering a statement to delete itself?
For eg when I ran test.sh script which conains:
<--some commands-->
rm test.sh
<--some more commands--&...
Gyrate asked 20/10, 2011 at 10:35
3
In this answer, Ryan directly calls the virtual destructor. I've tested the code in VS2010, and it correctly calls all destructors (tested with logging statements). Is it actually valid to do so? W...
Cymophane asked 17/5, 2011 at 19:30
3
Solved
The following code compiled with MSVC9.0 runs and outputs Destructor four times, which is logical.
#include <iostream>
class SomeClass
{
public:
void CommitSuicide()
{
delete this;
}
vo...
Calamine asked 18/10, 2010 at 13:29
4
Solved
Today, I have seen some legacy code. In the destructor there is a statement like "delete this". I think, this call will be recursive. Why it is working?
I made some quick search on Y!, I found tha...
Shutt asked 15/1, 2009 at 16:11
12
Solved
I was just reading this article and wanted SO folks advice:
Q: Should delete this; be called from within a member method?
Centaury asked 7/12, 2009 at 18:23
8
Solved
I'm writing a linked list and I want a struct's destructor (a Node struct) to simply delete itself, and not have any side effects. I want my list's destructor to iteratively call the Node destructo...
Cosmonaut asked 11/8, 2009 at 1:26
4
Solved
I have a form that I use to show some information for some seconds. Is it ok for the form to free itself? Can I start a timer in the constructor, and then call self.free in the timer-event? Or will...
Birdwatcher asked 2/4, 2009 at 8:46
3
I have this function, to create a DIV on-the-fly. But now, I want to destroy this object on onclick event, but I just don't know how.
function creatediv(id) {
var newdiv = document.createElement...
Informality asked 14/2, 2009 at 0:9
11
Solved
I've spent the last 4 years in C# so I'm interested in current best practices and common design patterns in C++. Consider the following partial example:
class World
{
public:
void Add(Object *obj...
Porte asked 6/2, 2009 at 23:17
1
© 2022 - 2024 — McMap. All rights reserved.