J
Jens Thoms Toerring
Hi,
sorry for the stupid subject but I had no good idea how to
condense it into a few words.
I have a method in a class A that calls a method of another class
B that in turn deletes the instance of class A from which it was
called (the B instance "owns" the instance of A and created it
calling 'new'). This feels a bit wrong since when the call of B's
method returns the instance of A has already ceased to exist. Ok,
I don't do anything in that method of A anymore after the call of
the B method returns (no use of 'this' or anything else that would
use data of A) but it still looks a bit dicy to me. Am I too pa-
ranoid and this is quite fine or are there real issues with this?
Best regards, Jens
sorry for the stupid subject but I had no good idea how to
condense it into a few words.
I have a method in a class A that calls a method of another class
B that in turn deletes the instance of class A from which it was
called (the B instance "owns" the instance of A and created it
calling 'new'). This feels a bit wrong since when the call of B's
method returns the instance of A has already ceased to exist. Ok,
I don't do anything in that method of A anymore after the call of
the B method returns (no use of 'this' or anything else that would
use data of A) but it still looks a bit dicy to me. Am I too pa-
ranoid and this is quite fine or are there real issues with this?
Best regards, Jens