object-lifetime
Why can't I dynamic_cast "sideways" during multiple inheritence?
The following code throws std::bad_cast struct Foo { void foo () {} }; struct Bar { Bar () { dynamic_cast <Foo &> (*this) .foo ();[详细]
2023-02-03 13:17 分类:问答The correct way to release variables in Objective-c
I know that in Objective-c there\'s a very easy way to declare variabl开发者_JAVA百科es like this:[详细]
2023-02-01 19:11 分类:问答Android - is onDestroy supposed to destroy the activity, its variables and free up memory
I have a bug in my code that made me think I don\'t fully understand the Android Lifecycle. Yes, I have read all the docs and looked at the diagrams, but they seem to talk only about when to save data[详细]
2023-01-30 17:56 分类:问答How to extend Memcached item lifetime without getting it?
Can I extend a lifetime of a Memcached item without actually getting it? Sure, I can开发者_JS百科 get the item, set it again and increase a lifetime.[详细]
2023-01-26 12:40 分类:问答What is the order of destruction of objects in VBScript?
In what order are objects in a .vbs destroyed? That is, given these globals: Set x = New Xxx Set y = New Yyy[详细]
2023-01-16 05:44 分类:问答C# Thread object lifetime
Suppose I have a code as follows: int Main() { if (true) { new Thread(()=> { doSomeLengthyOperation(); }).Start();[详细]
2023-01-15 17:27 分类:问答Is there any research on (or better use of) of RAII in GC languages?
Note: Object Lifetime RAII not using/with block scope RAII It seems like its possible using an extra gc category, short lived objects(check gc category somewhat frequently), long lived objects(check[详细]
2023-01-15 09:35 分类:问答Are singletons automatically persisted between requests in ASP.NET MVC?
I have a lookup table (LUT) of thousands integers that I use on a fair amount of requests to compute stuff based on what was fetched from database.[详细]
2023-01-11 09:36 分类:问答.NET: Way to determine if object has any references to it?
Q. Is there a way to find out if an object has any \"strong references\" to it? Raymond Chen hinted that a solution might be possible:[详细]
2023-01-11 02:27 分类:问答Get notification of object disposal/destruction
I need a way to track instances of various classes, without those classes having any knowledge that they are being tracked. Essentially, I have a class factory which creates instances and hands them o[详细]
2023-01-08 04:06 分类:问答