.TH "KJS::Collector" kde3 "11 Jun 2005" "Version Version 3.4.1" "kjs Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KJS::Collector \- Garbage collector.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <collector.h>\fP
.PP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void * \fBallocate\fP (size_t s)"
.br
.ti -1c
.RI "static bool \fBcollect\fP ()"
.br
.ti -1c
.RI "static int \fBsize\fP ()"
.br
.ti -1c
.RI "static bool \fBoutOfMemory\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Garbage collector. 
.PP
Definition at line 38 of file collector.h.
.SH "Member Function Documentation"
.PP 
.SS "void * KJS::Collector::allocate (size_t s)\fC [static]\fP"
.PP
Register an object with the collector. 
.PP
The following assumptions are made: 
.PD 0

.IP "\(bu" 2
the operator new() of the object class is overloaded. 
.IP "\(bu" 2
operator delete() has been overloaded as well and does not free the memory on its own.
.PP
\fBParameters:\fP
.RS 4
\fIs\fP Size of the memory to be registered. 
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the allocated memory. 
.RE
.PP

.PP
Definition at line 82 of file collector.cpp.
.PP
References KJS::ValueImp::_vd, and collect().
.SS "bool KJS::Collector::collect ()\fC [static]\fP"
.PP
Run the garbage collection. 
.PP
This involves calling the delete operator on each object and freeing the used memory. 
.PP
Definition at line 157 of file collector.cpp.
.PP
References KJS::ValueImp::_flags, KJS::ValueImp::_vd, KJS::ValueImp::mark(), KJS::ValueImp::refcount, and KJS::ValueImp::~ValueImp().
.PP
Referenced by allocate(), and KJS::Interpreter::collect().

.SH "Author"
.PP 
Generated automatically by Doxygen for kjs Library from the source code.
