View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031619 | FPC | Documentation | public | 2017-03-31 19:22 | 2018-07-25 20:58 |
Reporter | African Wild Dog | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | Product Build | ||||
Target Version | 3.2.0 | Fixed in Version | 3.1.1 | ||
Summary | 0031619: Details about contructors is missing from documentation | ||||
Description | * The documentation should mention that, when a exception is raised inside a constructor, the destructor is automatically invoked; * The documentation should mention that the fields of a instance is automatically "zeroed" by the compiler; | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 1408 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
As sven pointed out: "Keep in mind however that the second behavior can be changed by overriding TObject.NewInstance (the default implementation allocates the memory of the class and zeroes it)." |
|
"* The documentation should mention that, when a exception is raised inside a constructor, the destructor is automatically invoked;" This is afaik not correct if the exception is fatal. Like EOutOfMemory. It is also not correct if the exception is actually handled inside the constructor. |
|
"This is afaik not correct if the exception is fatal. Like EOutOfMemory. It is also not correct if the exception is actually handled inside the constructor." So, the documentation should mention that, if an exception is fatal or if an exception is handled inside a constructor, the destructor is not invoked, otherwise the destructor will be invoked. |
|
Added some comments about this in the 'class instantiation' section. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-31 19:22 | African Wild Dog | New Issue | |
2017-03-31 19:22 | African Wild Dog | Status | new => assigned |
2017-03-31 19:22 | African Wild Dog | Assigned To | => Michael Van Canneyt |
2017-04-01 00:38 | African Wild Dog | Note Added: 0099317 | |
2017-04-01 13:59 | Thaddy de Koning | Note Added: 0099329 | |
2017-04-07 17:32 | African Wild Dog | Note Added: 0099474 | |
2017-04-22 14:36 | Michael Van Canneyt | Fixed in Revision | => 1408 |
2017-04-22 14:36 | Michael Van Canneyt | Note Added: 0099773 | |
2017-04-22 14:36 | Michael Van Canneyt | Status | assigned => resolved |
2017-04-22 14:36 | Michael Van Canneyt | Fixed in Version | => 3.1.1 |
2017-04-22 14:36 | Michael Van Canneyt | Resolution | open => fixed |
2017-04-22 14:36 | Michael Van Canneyt | Target Version | => 3.2.0 |
2018-07-25 20:58 | African Wild Dog | Status | resolved => closed |