This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Recent CVS commits


Robert Collins <rbcollins@cygwin.com> wrote:

> Oh, and I've not updated the client code to use the new
> LogFile::createLogFile factory yet. That should be a one liner (for a
> heap allocated object) or two liner (for a member object) update.

I've never really programmed any complicated inheritance, but why do we need
a factory instead of a constructor?

You left in the declaration of LogFile::LogFile(), without a definition. I
added:

LogFile::LogFile() : LogSingleton(new std::stringbuf)
{
}

and that seems to work. No updates needed for the client code. Have I missed
some subtle resource leak in doing this?

Max.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]