Re: Hoe to create Singleton objects with GObjects ?
- From: Hrvoje Nikšić <hrvoje niksic avl com>
- To: gtk-list gnome org
- Subject: Re: Hoe to create Singleton objects with GObjects ?
- Date: Wed, 27 Jun 2007 10:11:15 +0200
On Tue, 2007-06-26 at 17:56 +0200, David Nečas (Yeti) wrote:
> The commonly listed reasons for nonsubclassable types are
> performance and security (in languages where final classes
> can have any effect on these) -- not encapsulation which is
> achieved by other means.
There are other reasons as well. Some classes are not designed to be
subclassed and don't work well when subclassed. (A C++ example would be
a class with a non-virtual destructor.) The author of such a class can
always document it as being non-subclassable, but designers typically
prefer to pass enforcement of such constraints to the compiler by
declaring the class final.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]