[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim]
From:       Thomas McGuire <thomas.mcguire () gmx ! net>
Date:       2008-05-20 20:18:06
Message-ID: 200805202218.06648.thomas.mcguire () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi,

On Tuesday 20 May 2008, Tom Albers wrote:
> Op dinsdag 20 mei 2008 19:44 schreef u:
> > > Because it's a static block of data in a shared library, not app. If
> > > you use K_GLOBAL_STATIC, you know you'll have one global instance
> > > with initialized members.
> > > See http://www.kdedevelopers.org/node/2889
> >
> > Apart from this the static was shared by all instances of SocketPrivate.
> > I don't think this is what was intended unless SocketPrivate was a
> > singleton. But even if it was a singleton then one should still have
> > used a member variable for buffering the incoming data.
> >
> > IOW, unless I'm missing something then using a static local variable was
> > plain wrong.
>
> Well, I still don't understand the difference with a global member in that
> case. Both ways it can expose the wrong data, right?
The static variable is shared by all instances of the socket class, whereas 
each instance has its own member variable. I can ownly imagine this leads to 
big problems when using multiple sockets at the same time...

Regards,
Thomas


["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic