Double Finalize in Managed Enumerator Records
Original Reporter info from Mantis: Warfley
-
Reporter name: Frederic
Original Reporter info from Mantis: Warfley
- Reporter name: Frederic
Description:
When using managed records as enumerator types (via management operators), the finalize will be called twice with only one Initialize, no AddRef and no Copy.
See the example project for further information:
Steps to reproduce:
Compile the attached program with fpc 3.2 RC1 or 3.3.1 and run the example.
Additional information:
The example prints out "init" during the initialize operator, "ref" during AddRef, "copy" during Copy and "final" during Finalize. Result:
init
final
0
1
final
Final is called two times without any Init, Copy or AddRef in between
My guess is that this datastructure is somehow copied without calling the appropriate operator (AddRef or Copy)
Mantis conversion info:
- Mantis ID: 37164
- OS: Manjaro
- Platform: Linux
- Version: 3.3.1
- Monitored by: » @benibela (Benito van der Zander), » @MageSlayer (Denis Golovan)