JX Application Framework
Loading...
Searching...
No Matches
Macros | Functions
jNew.h File Reference
#include <stdlib.h>
#include "jTypes.h"
Include dependency graph for jNew.h:
This graph shows which files directly or indirectly include this file:

Macros

#define _J_MEMORY_BUCKET   0
 
#define jnew   new(__FILE__, __LINE__, _J_MEMORY_BUCKET, true)
 
#define jnew_allow_null   new(__FILE__, __LINE__, _J_MEMORY_BUCKET, false)
 
#define jdelete   JLocateDelete(__FILE__, __LINE__), delete
 

Functions

void * operator new (size_t size, const JUtf8Byte *file, const JUInt32 line, const int type, const bool assert) noexcept
 
void * operator new[] (size_t size, const JUtf8Byte *file, const JUInt32 line, const int type, const bool assert) noexcept
 
void JLocateDelete (const JUtf8Byte *file, const JUInt32 line)
 

Macro Definition Documentation

◆ _J_MEMORY_BUCKET

#define _J_MEMORY_BUCKET   0

◆ jdelete

#define jdelete   JLocateDelete(__FILE__, __LINE__), delete

◆ jnew

#define jnew   new(__FILE__, __LINE__, _J_MEMORY_BUCKET, true)

◆ jnew_allow_null

#define jnew_allow_null   new(__FILE__, __LINE__, _J_MEMORY_BUCKET, false)

Function Documentation

◆ JLocateDelete()

void JLocateDelete ( const JUtf8Byte file,
const JUInt32  line 
)

◆ operator new()

void * operator new ( size_t  size,
const JUtf8Byte file,
const JUInt32  line,
const int  type,
const bool  assert 
)
noexcept

The JCore replacement for operator new. These functions are simply an interface to the appropriate JMemoryManager functions.

2016/01/05: The latest C++ standard, allows "= delete" to be appended to a function declaration. This broke the original "delete" macro.

Base code generated by Codemill v0.1.0

◆ operator new[]()

void * operator new[] ( size_t  size,
const JUtf8Byte file,
const JUInt32  line,
const int  type,
const bool  assert 
)
noexcept