Page 1 of 1

Posted: Tue Feb 25, 2003 8:22 am
by BackupUser
Restored from previous forum. Originally posted by freak.

Hi,

This one goes to Fred, I think...

I know, that the PB String management is not threadsave, but what if I use String Constants in the Threads only? Or what about if I only use fixed Strings directly with the Functions and use no String Variables at all?

Would that be save, or am I still going to get in a mess?

Thanks in advice...

Timo

Posted: Tue Feb 25, 2003 8:42 am
by BackupUser
Restored from previous forum. Originally posted by fred.

it should be safe, as no duplication will be done. But don't use string functions on them, as it will use the internal string buffer...

Fred - AlphaSND

Posted: Tue Feb 25, 2003 10:59 am
by BackupUser
Restored from previous forum. Originally posted by freak.

Thanks, i think, i'm going to avoid using Strings wherever possible and where I have to, i'm going to use GlobalAlloc_() to manage them on my own.

But If I had to replace the Constants with Memory Buffers, too, it would be a lot of work to do.

Timo

Posted: Tue Feb 25, 2003 4:52 pm
by BackupUser
Restored from previous forum. Originally posted by tranquil.

Is it possible to read string arrays without problems in threads? or does it make problems too?

Mike

Tranquilizer/ Secretly!
http://www.secretly.de
Registred PureBasic User
System: Windows 2000 Server, 512 MB Ram, GeForce4200 TI 128 MB DDR, Hercules Theater 6.1 DTS Sound
System 2: Mobile Pentium 4 2.4GHz 512 MB DDR GeForce4 420-32, Windows XP Home