Coming From /
CPlus Plus
Porting is covered in PortingFromCxx
- Programming in D for C++ Programmers
- D Strings vs C++ Strings
- D's Design by Contract vs. C++'s
- D Complex Types and C++ std::complex
- D Memory Management
Memory
Allocation for Objects
D creates objects on the heap by default, using "new".
So these definitions:
|
hold object references (initialized to NULL). The object data itself will be allocated on the heap when you create the objects (using "new").
To allocate on the stack (IIRC this is supported only in function scope):
|
Related
- Languages vs. D
- D Transition Guide
- Feature List
- Rosetta Code: D category
- Language Specification
- Development with D
- VisualD C++ Conversion Wizard