Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions
gc_cpp.h File Reference
#include "gc.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gc
class  gc_cleanup

Defines

#define _cdecl

Typedefs

typedef void(* GCCleanUpFunc )(void *obj, void *clientData)

Enumerations

enum  GCPlacement { GC, NoGC, PointerFreeGC }

Functions

voidoperator new (size_t size, GCPlacement gcp, GCCleanUpFunc cleanup=0, void *clientData=0)

Define Documentation

Definition at line 132 of file gc_cpp.h.


Typedef Documentation

Definition at line 171 of file gc_cpp.h.


Enumeration Type Documentation

Enumerator:
GC 
NoGC 
PointerFreeGC 

Definition at line 141 of file gc_cpp.h.


Function Documentation

void * operator new ( size_t  size,
GCPlacement  gcp,
GCCleanUpFunc  cleanup = 0,
void clientData = 0 
) [inline]

Definition at line 256 of file gc_cpp.h.

{
    void* obj;

    if (gcp == GC) {
        obj = GC_MALLOC( size );
        if (cleanup != 0) 
            GC_REGISTER_FINALIZER_IGNORE_SELF( 
                obj, cleanup, clientData, 0, 0 );}
    else if (gcp == PointerFreeGC) {
        obj = GC_MALLOC_ATOMIC( size );}
    else {
        obj = GC_MALLOC_UNCOLLECTABLE( size );};
    return obj;}