Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JNewCArray< JClass_t > Class Template Reference

Memory management class for create/release policy based on new []/delete []. More...

#include <JMemory.hh>

Static Public Member Functions

static JClass_t * create (const unsigned int size)
 Create array of objects in memory.
 
static void release (JClass_t *p)
 Release memory.
 

Detailed Description

template<class JClass_t>
class JLANG::JNewCArray< JClass_t >

Memory management class for create/release policy based on new []/delete [].

Definition at line 52 of file JMemory.hh.

Member Function Documentation

◆ create()

template<class JClass_t >
static JClass_t * JLANG::JNewCArray< JClass_t >::create ( const unsigned int size)
inlinestatic

Create array of objects in memory.

Parameters
sizenumber of elements
Returns
pointer to data

Definition at line 60 of file JMemory.hh.

61 {
62 return new JClass_t[size];
63 }

◆ release()

template<class JClass_t >
static void JLANG::JNewCArray< JClass_t >::release ( JClass_t * p)
inlinestatic

Release memory.

Parameters
ppointer to data

Definition at line 71 of file JMemory.hh.

72 {
73 delete [] p;
74 }

The documentation for this class was generated from the following file: