Hi,
perhaps a safe, generic function for this copying could be added to the
RTL. Like:
Procedure ManagedMove(const source: T;var dest: T;count: SizeInt);
a) For non-managed types it would be the same as Move(source, dest,
count*sizeof(T))
b) For reference counted types (like strings or i
I've made a sample program that demonstrates the problem, it's at:
gist.github.com/Zaaphod/936901eb5f31df5044d2bd36a7cf6c91
When I was testing it, I found out that the problem shows up also with
PTCCRT.Keypressed,
Procedure to re-produce bug in Putimage
1. Run program in Windows
2. Do something t
Benito van der Zander via fpc-pascal
schrieb am Mo., 11. Jan. 2021, 15:26:
> Hi,
>
> perhaps a safe, generic function for this copying could be added to the
> RTL. Like:
>
> Procedure ManagedMove(const source: T;var dest: T;count: SizeInt);
>
In principle a good idea. However this is one of tho
On Sun, Jan 10, 2021 at 12:09 PM Sven Barth via fpc-pascal
wrote:
> If after the Move only one of the two references is reachable anymore
> (because e.g. some internal count variable "ends" the array before that
> element) then you don't need to care about increasing the reference
> count, cause