Regards,<br />Seb<br /> <br />SCJP 1.4
With option 2, if instance has been created, no lock is required : the code seems to be more efficient.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Regards,<br />Seb<br /> <br />SCJP 1.4
Originally posted by Seb Mathe:
Well, you confirm that optimizing is a diffucult thing for developers...
And I'm affraid that some commercial products implements Singleton pattern with "option 2"...
![]()
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi