RAD Studio |  |

E2459: Delphi style classes must be constructed using operator new (C++)
Example
Collapse All

Delphi style classes cannot be statically defined. They have to be constructed on the heap.

Example
Copy Code

    voidfoo(void)
    {
         Tobject   o1;     // Error;
         Tobject  *o2 = new TObject();
    }

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!