Created on 1999-06-20.00:00:00 last changed 301 months ago
Rationale (10/99): Even in the "traditional" ordering of the calls to allocation functions and constructors, memory can still leak. For instance, if T1 were successfully constructed and then the construction of T2 were terminated by an exception, the memory for T1 would be lost. Programmers concerned about memory leaks will avoid this kind of construct, so it seems unnecessary to provide special treatment for it to avoid the memory leaks associated with one particular implementation strategy.
Clause 7 [expr] paragraph 4 appears to grant an implementation the right to generate code for a function call like
f(new T1, new T2)in the order
Suggested resolution: either forbid the ordering above or expand the requirement for reclaiming storage to include exceptions thrown in all operations between the allocation and the completion of the constructor.
Rationale (10/99): Even in the "traditional" ordering of the calls to allocation functions and constructors, memory can still leak. For instance, if T1 were successfully constructed and then the construction of T2 were terminated by an exception, the memory for T1 would be lost. Programmers concerned about memory leaks will avoid this kind of construct, so it seems unnecessary to provide special treatment for it to avoid the memory leaks associated with one particular implementation strategy.
History | |||
---|---|---|---|
Date | User | Action | Args |
2000-02-23 00:00:00 | admin | set | messages: + msg279 |
2000-02-23 00:00:00 | admin | set | status: open -> nad |
1999-06-20 00:00:00 | admin | create |