When Does A Structure Variable Get Destroyed #324
When does a structure variable get destroyed?
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Object Oriented Concepts - Structures - Quiz No.1.
When does a structure variable get destroyed?
When no reference refers to it, it will get garbage collected
Depends on whether it is created using new or without new operator
As variable goes out of the scope
Depends on either we free its memory using free() or delete()