Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::GC::Anchored Class Reference

#include <gc-anchored.h>

Inheritance diagram for Inkscape::GC::Anchored:

Inkscape::MessageStack SPSelection SPAction

List of all members.

Detailed Description

A base class for anchored objects. Objects are managed by our mark-and-sweep collector, but are anchored against garbage collection so long as their reference count is nonzero.

Object and member destructors will not be called on destruction unless a subclass also inherits from Inkscape::GC::Finalized.

New instances of anchored objects should be created using the C++ new operator. Under normal circumstances they should not be created on the stack.

A newly created anchored object begins with a refcount of one, and will not be collected unless the refcount is zero.

Note that a cycle involving an anchored object (with nonzero refcount) cannot be collected. To avoid this, don't increment refcounts for pointers between two garbage-collected objects.

See also:




Definition at line 47 of file gc-anchored.h.

Public Member Functions

void anchor () const
void release () const

Private Member Functions

void _free_anchor (Anchor *anchor) const
Anchor * _new_anchor () const
 Anchored (Anchored const &)
void operator= (Anchored const &)

Private Attributes

Anchor * _anchor


struct  Anchor

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index