A
A
in a function:
void Image_AssignImage(TObject *Sender)
{
dynamic_cast<TObjectDescendant *>(Sender)->DoWhatever();
}
in above function dynamic_cast is simply casting Tobject into compatible
TObjectDescendant and then calls function DoWhatever contained in
TObjectDescendant (and not in Tobject)?
The above does not need any kind of delete or something like that right? I
suppose it does not but would like to verify this.
(note: Sender always points to existing object that is deleted on program
exit so does not need deleting itself in above example)
void Image_AssignImage(TObject *Sender)
{
dynamic_cast<TObjectDescendant *>(Sender)->DoWhatever();
}
in above function dynamic_cast is simply casting Tobject into compatible
TObjectDescendant and then calls function DoWhatever contained in
TObjectDescendant (and not in Tobject)?
The above does not need any kind of delete or something like that right? I
suppose it does not but would like to verify this.
(note: Sender always points to existing object that is deleted on program
exit so does not need deleting itself in above example)