View Issue Details

IDProjectCategoryView StatusLast Update
0010033Open CASCADEOCCT:WOKpublic2012-01-13 17:59
ReporterabvAssigned Toabv 
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
OSAll 
Fixed in Version6.1.1 
Summary0010033: WOK: Avoid defining new() and delete() for classes derived from other
DescriptionCurrently when WOK generates header file for a CDL class, it includes there
definitions for operators new() and delete().

This is not needed in most cases and even more -- it is bad when class is
derived from another for several reasons:

- These operators are inherited from the base class

- Redefinition of these operators in derived class is dangerous, since when the
object is deleted using pointer to a base class, the method delete() of the base
class will be called instead of the same method of derived class. (See attached
CPP file for example.)

- The documentation generated by Doxygen is polluted by these ridiculous methods

- This increases size of header files and number of definitions to be processed
by compiler

Thus the proposal is to avoid generating these methods in classes that inherit
from others (note that they are actually useful in very basic classes such as
Standard_Transient)
Additional information
and documentation updates
Documentation remark, added by ABV 2006-10-05 10:48:37:

New features:


Improvements:
Automatic generation of methods new() and delete() in the classes that inherit
from others is now avoided.

Changes:


Modified entities:

TagsNo tags attached.
Test case number

Attached Files

  • NewDeleteOverride.cpp (1,257 bytes)

Relationships

related to 0013051 closedpdn Using nonexistent objects in Standard_ForMapOfTypes class 

Activities

2005-09-19 13:27

 

NewDeleteOverride.cpp (1,257 bytes)

Issue History

Date Modified Username Field Change
2006-01-31 14:07 bugmaster Assigned To bugmaster => imv
2006-01-31 14:07 bugmaster Status new => assigned
2006-08-07 11:42 bugmaster Assigned To imv => abv
2006-08-08 18:28 abv OtherBugsDependingOnThis => 13051
2006-09-06 09:42 bugmaster Status assigned => verified
2006-10-31 15:33 bugmaster Status verified => closed
2006-10-31 15:33 bugmaster Resolution @0@ => fixed
2012-01-13 17:59 atp Description Updated
2012-01-13 17:59 atp Additional Information Updated