Re: Reference Counted Class Please :)
From: Skybuck Flying (nospam_at_hotmail.com)
Date: 11/19/04
- Next message: Skybuck Flying: "Re: OO problem: How to create a duplicate of a derived class with only a base variable ?"
- Previous message: Rob Kennedy: "Re: OO problem: How to create a duplicate of a derived class with only a base variable ?"
- Maybe in reply to: Rob Kennedy: "Re: Reference Counted Class Please :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Nov 2004 08:48:16 +0100
Well if I designed my thing a little bit different all procedures would look
the same and then all objects would "implement" the same interface
and then I would not need the IS operator.
Though it would make my code a litttttle bit less easy to read.
And quite frankly I don't like the loss of this "is" operator functionality
or any other possible lost functionality...
just so that objects are reference counted.
No... then I rather choose for "reference hell"
And make sure that all added objects to the container are not referenced by
any others variables outside the container ;) just to avoid references to
destroyed objects... (the objects can be destroyed by the container when
some processing function is called ;) )
Well that was a short lived venture into interfaces hehehehe.
Besides cleaning up after yourself is good practice anyway :) it's just a
little bit less lazy... and maybe a little bit less efficient... though I
wonder... what if the content changes of an interfaced object... does it do
a copy on write like a string ? probably not ;)
So I would still have to do manual duplication...
So the only thing gained with interfaces is auto clean up... <- and in
general I do find this bad coding practices :) *** having an invalid
reference might be bad as well.
Gje :)
Bye,
Skybuck.
- Next message: Skybuck Flying: "Re: OO problem: How to create a duplicate of a derived class with only a base variable ?"
- Previous message: Rob Kennedy: "Re: OO problem: How to create a duplicate of a derived class with only a base variable ?"
- Maybe in reply to: Rob Kennedy: "Re: Reference Counted Class Please :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]