Memory management class for create/release policy based on malloc()/free().
More...
#include <JMemory.hh>
|
static JClass_t * | create () |
| Create object in memory. More...
|
|
static JClass_t * | create (const unsigned int size) |
| Create array of objects in memory. More...
|
|
static void | release (JClass_t *p) |
| Release memory. More...
|
|
template<class JClass_t>
class JLANG::JMalloc< JClass_t >
Memory management class for create/release policy based on malloc()/free().
Definition at line 82 of file JMemory.hh.
◆ create() [1/2]
template<class JClass_t >
Create object in memory.
- Returns
- pointer to data
Definition at line 89 of file JMemory.hh.
91 return (JClass_t*) malloc(
sizeof(JClass_t));
◆ create() [2/2]
template<class JClass_t >
static JClass_t* JLANG::JMalloc< JClass_t >::create |
( |
const unsigned int |
size | ) |
|
|
inlinestatic |
Create array of objects in memory.
- Parameters
-
- Returns
- pointer to data
Definition at line 101 of file JMemory.hh.
103 return (JClass_t*) malloc(size *
sizeof(JClass_t));
◆ release()
template<class JClass_t >
Release memory.
- Parameters
-
Definition at line 112 of file JMemory.hh.
The documentation for this class was generated from the following file: