Re: [fpc-pascal] Array clearing

2017-04-02 Thread Sven Barth via fpc-pascal
On 02.04.2017 11:22, Ryan Joseph wrote: > >> On Apr 1, 2017, at 9:25 PM, Jürgen Hestermann >> wrote: >> >> If you just need to reuse the same array and only need to zero its elements >> then of course fillchar would be the fastest approach (it saves the memory >> reallocation step). > > Why is

Re: [fpc-pascal] Setting record values

2017-04-02 Thread Sven Barth via fpc-pascal
On 01.04.2017 09:59, Ryan Joseph wrote: > >> On Apr 1, 2017, at 2:46 PM, Sven Barth via fpc-pascal >> wrote: >> >> I haven't looked at it in detail, but it could be that both have similar >> efficiency. You could also add "inline" to the MakePoint function which >> should get rid of a potentia

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-04-02 Thread fredvs
> TDummyThread.Create(True) Huh, I have memory leak with this. Should it not be: --> TDummyThread.Create(false) ? (because with this, no memory leak) Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Call-function-in-shared-libra

Re: [fpc-pascal] Array clearing

2017-04-02 Thread Jonas Maebe
On 02/04/17 11:22, Ryan Joseph wrote: On Apr 1, 2017, at 9:25 PM, Jürgen Hestermann wrote: If you just need to reuse the same array and only need to zero its elements then of course fillchar would be the fastest approach (it saves the memory reallocation step). Why is this “of course”? What’s

Re: [fpc-pascal] Array clearing

2017-04-02 Thread Ryan Joseph
> On Apr 1, 2017, at 9:25 PM, Jürgen Hestermann > wrote: > > If you just need to reuse the same array and only need to zero its elements > then of course fillchar would be the fastest approach (it saves the memory > reallocation step). Why is this “of course”? What’s the implementation of Fill