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 Inkscape::Selection Inkscape::UI::View::View Inkscape::Whiteboard::MessageNode Inkscape::XML::Node SPDocument SPDesktop SPSVGView 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: If you create an object yourself, it is already anchored for you. You do not need to anchor it a second time.

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 GC-managed objects.

See also:
Inkscape::GC::Managed

Inkscape::GC::Finalized

Inkscape::GC::anchor

Inkscape::GC::release

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


Public Member Functions

unsigned _anchored_refcount () const
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

Classes

struct  Anchor

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

Generated by  Doxygen 1.6.0   Back to index