.PP
.TH "KJS::Collector" 3 "28 Jan 2004" "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 "void * \fBallocate\fP (size_t s)"
.br
.RI "\fIRegister an object with the collector. \fP"
.ti -1c
.RI "bool \fBcollect\fP ()"
.br
.RI "\fIRun the garbage collection. \fP"
.ti -1c
.RI "int \fBsize\fP ()"
.br
.ti -1c
.RI "bool \fBoutOfMemory\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Garbage collector. Definition at line 59 of file collector.h.
.SH "Member Function Documentation"
.PP 
.SS "void * Collector::allocate (size_t s)\fC [static]\fP"
.PP
Register an object with the collector. The following assumptions are made: 
.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
Definition at line 75 of file collector.cpp.
.PP
References collect().
.SS "bool Collector::collect ()\fC [static]\fP"
.PP
Run the garbage collection. This involves calling the delete operator on each object and freeing the used memory. Definition at line 140 of file collector.cpp.
.PP
References KJS::ValueImp::_flags, KJS::ValueImp::mark(), KStdAccel::next(), KJS::ValueImp::refcount, and KJS::ValueImp::~ValueImp().
.PP
Referenced by allocate().

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