🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.oodesign
Article #112

Re: object create order

#112
From: Phil Staite
Date: Mon, 08 Nov 2004 01:03
10 lines
1170 bytes
You could do something like:

EventManager& getAManager() {
  static EventManager someManager;
  return someManager;
}

The nice thing here is that someObject is only created when needed, the
first time the function is called.
Technical Details
Message-ID: <418ed304$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail
References: <kcdqo0t2f0vkit49u0l9goji42stukiq17@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,7fd39362bd6d0fe2
X-Google-Attributes: gid10db1e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Phil Staite" <no.spam@not.a.chance>
Newsgroups: borland.public.cppbuilder.oodesign
References: <kcdqo0t2f0vkit49u0l9goji42stukiq17@4ax.com>
Subject: Re: object create order
Date: Sun, 7 Nov 2004 19:03:23 -0600
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 206.53.29.93
Message-ID: <418ed304$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099879172 206.53.29.93 (7 Nov 2004 17:59:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail