Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / C++

AGM::LibGC: A C++ Garbage Collection Library

Rate me:
Please Sign up or sign in to vote.
4.67/5 (13 votes)
30 Jul 20043 min read 126.5K   871   28  
A library for C++ garbage collection
This article discusses a library called AGM::LibGC for garbage collection in C#. We will take a look at three fundamental problems of reference counting, and state how the solution offered by LibGC has none of these disadvantages.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>template<class T> struct  Finalizer</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>template&lt;class T&gt; struct  <A HREF="#DOC.DOCU">Finalizer</A></H2></H2><BLOCKQUOTE>The Finalizer struct is used for calling the destructor of an object of  type T.</BLOCKQUOTE>

<HR>
<P><DL>
 <DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   void <B><A HREF="#DOC.1.1">destroy</A></B>(T* obj) const 
<DD><I>the function to call to finalize an object of type T.</I>
</DL></P>


<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>The Finalizer struct is used for calling the destructor of an object of 
type T. Finalizer objects can be passed as parameters to operator 'new'.</BLOCKQUOTE>
<DL>

<A NAME="destroy"></A>
<A NAME="DOC.1.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   void destroy(T* obj) const </B></TT>
<DD>the function to call to finalize an object of type T. It will call
the object's destructor.

<DL><DT><DT><B>Parameters:</B><DD><B>obj</B> -  pointer to object to finalize.<BR><DD></DL><P></DL>
<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Software Developer (Senior)
Greece Greece
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions