Skip to main content
Filter by
Sorted by
Tagged with
31 votes
7 answers
39k views

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 ...
George's user avatar
  • 1,475
7 votes
8 answers
3k views

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 destructor ...
jkeys's user avatar
  • 3,985
17 votes
4 answers
10k views

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 ...
Vegar's user avatar
  • 12.9k
36 votes
10 answers
30k views

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 true, ...
Cristián Romo's user avatar
6 votes
3 answers
8k views

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(...
RSilva's user avatar
  • 6,953
25 votes
11 answers
22k views

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 *...
Generic Error's user avatar
30 votes
4 answers
7k views

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 that ...
Vinay's user avatar
  • 4,803

1
2