Documentation for the default constructor TObject.Create is wrong.
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
The documentation states that the default constructor TObject.Create does nothing: https://www.freepascal.org/docs-html/rtl/system/tobject.create.html
But it does call NewInstance, which is virtual, which in turn calls initinstance which in turn returns the instance through the default constructor to assign it to an instance variable.
You can easily see that in the debugger.
Since NewInstance is virtual the documentation is misleading.
Although NewInstance can be called directly, the default constructor is the preferred way to set up the instance. And so does a little more than nothing....
Steps to reproduce:
Debug a Tobject.Create...
Mantis conversion info:
- Mantis ID: 34699
- OS: all
- OS Build: all
- Platform: all
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 1526 (#c25a0897)
- Target version: 3.3.1