Can we control when a destructor is called?

Options
- Yes
- No


CORRECT ANSWER : No

Discussion Board
Chris is wrong

Chris, that pattern has nothing to do with finalizers. you can have the gc ignore your finalisers, but other than calling gc.collect, you cant know when your finaliser is actaully called (if it isnt supressed)

Mandy 07-11-2016 12:01 AM

Yes, we can

When using the dipose pattern, we can control when an object is disposed, i.e. the destructor is called

Chris 02-25-2014 06:30 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement