#include <c4d_customdatatype.h>
template<class X>
struct iCustomDataType< X >
The base class for data types with Alloc() and Free() for use in libraries. Pass the public data type as template parameter. 
- Note
 - The advantage of this class is to not need to provide library functions for Alloc() and Free(), as the internal and external type will share this functionality. 
 
 | 
| static X *  | Alloc () | 
|   | 
| static void  | Free (X *&data) | 
|   | 
◆ Alloc()
Allocates an X data type. Destroy the allocated X data type with Free(). Use AutoAlloc to automate the allocation and destruction based on scope. 
- Returns
 - The allocated X data type, or nullptr if the allocation failed. 
 
 
 
◆ Free()
  
  
      
        
          | static void Free  | 
          ( | 
          X *&  | 
          data | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Destructs X data types allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope. 
- Parameters
 - 
  
    | [in,out] | data | The X data type to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.  |