Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Maciej Izak
2016-04-11 6:55 GMT+02:00 Anthony Walter : > I've done a little testing on your smart pointer branch but haven't found > any issues recently. Can you tell me if there is a tag for this feature in > mantis yet and/or if there are any known issues? > As Sven stated I am not core developer and repor

Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Maciej Izak
2016-04-10 23:54 GMT+02:00 Sven Barth : > There are two things to differentiate: > > - Default() used in global variables > - Default() used locally > > The latter creates a local variable and basically FillChar()s it while the > former creates a zero initialized global variable. > (Thinking about

Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Sven Barth
Am 11.04.2016 06:56 schrieb "Anthony Walter" : > > Maciej, > > I've done a little testing on your smart pointer branch but haven't found any issues recently. Can you tell me if there is a tag for this feature in mantis yet and/or if there are any known issues? There is no tag for this, because Mac

Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Anthony Walter
Maciej, I've done a little testing on your smart pointer branch but haven't found any issues recently. Can you tell me if there is a tag for this feature in mantis yet and/or if there are any known issues? Thanks ___ fpc-devel maillist - fpc-devel@lis

Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Sven Barth
Am 10.04.2016 23:54 schrieb "Sven Barth" : > > Am 10.04.2016 21:34 schrieb "Maciej Izak" : > > > > Hi, > > > > Is right to call Initialize operator for Default(TFoo) where TFoo is record with management operators? IMO the right direction is to keep "meta record instance" in place where TFoo is decl

Re: [fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Sven Barth
Am 10.04.2016 21:34 schrieb "Maciej Izak" : > > Hi, > > Is right to call Initialize operator for Default(TFoo) where TFoo is record with management operators? IMO the right direction is to keep "meta record instance" in place where TFoo is declared and call Initialize operator before "class constru

[fpc-devel] Initialize/Finalize management operators and Default intrinsic

2016-04-10 Thread Maciej Izak
Hi, Is right to call Initialize operator for Default(TFoo) where TFoo is record with management operators? IMO the right direction is to keep "meta record instance" in place where TFoo is declared and call Initialize operator before "class constructors" and before initialize section (TFoo class va

Re: [fpc-devel] Management operators AddRef and Copy vs Copy

2016-04-10 Thread Maciej Izak
2016-04-10 14:45 GMT+02:00 Florian Klämpfl : > I think this is the wrong way: > - AddRef means only to increase the ref. count of the passed data structure > - Copy is no deep copy, it means only: copy the current data structure, if > it references managed > types, their ref. count is increased bu

Re: [fpc-devel] Management operators AddRef and Copy vs Copy

2016-04-10 Thread Florian Klämpfl
Am 10.04.2016 um 13:06 schrieb Maciej Izak: > Hi, > > Sven proposed that we need to discuss AddRef operator (important part of > smart pointers implementation). > > AddRef is used when record is passed as parameter to method/function by value > (for records to large > to copy (only the address

[fpc-devel] Management operators AddRef and Copy vs Copy

2016-04-10 Thread Maciej Izak
Hi, Sven proposed that we need to discuss AddRef operator (important part of smart pointers implementation). AddRef is used when record is passed as parameter to method/function by value (for records to large to copy (only the address is pushed)). AddRef is used also for dynamic array operations