Robert Collins <[EMAIL PROTECTED]> 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.

Reply via email to