Inkscape
Vector Graphics Editor
|
Boehm-GC based garbage collector. More...
Classes | |
class | Alloc |
class | Anchored |
A base class for anchored objects. More... | |
struct | Core |
class | Managed |
A base class for objects for whom the normal new and delete operators should use the garbage-collected allocator. More... | |
struct | Ops |
Typedefs | |
typedef void(* | CleanupFunc) (void *mem, void *data) |
Enumerations | |
enum | ScanPolicy { SCANNED , ATOMIC } |
enum | CollectionPolicy { AUTO , MANUAL } |
enum | Delete { GC } |
Functions | |
template<typename R > | |
static R & | anchor (R &r) |
Increments the reference count of a anchored object. | |
template<typename R > | |
static R * | anchor (R *r) |
Increments the reference count of a anchored object. | |
template<typename R > | |
static R & | release (R &r) |
Decrements the reference count of a anchored object. | |
template<typename R > | |
static R * | release (R *r) |
Decrements the reference count of a anchored object. | |
template<typename T1 , typename T2 , ScanPolicy scan1, ScanPolicy scan2, CollectionPolicy collect1, CollectionPolicy collect2> | |
bool | operator== (Alloc< T1, scan1, collect1 > const &, Alloc< T2, scan2, collect2 > const &) |
template<typename T1 , typename T2 , ScanPolicy scan1, ScanPolicy scan2, CollectionPolicy collect1, CollectionPolicy collect2> | |
bool | operator!= (Alloc< T1, scan1, collect1 > const &, Alloc< T2, scan2, collect2 > const &) |
void | init () |
void | request_early_collection () |
Boehm-GC based garbage collector.
This namespace contains code related to the garbage collector and base classes for GC-managed objects.
typedef void(* Inkscape::GC::CleanupFunc) (void *mem, void *data) |
enum Inkscape::GC::Delete |
Increments the reference count of a anchored object.
This function template generates functions which take a reference to a anchored object of a given type, increment that object's reference count, and return a reference to the object of the same type as the function's parameter.
m | a reference to a anchored object |
Definition at line 92 of file gc-anchored.h.
References Inkscape::GC::Anchored::anchor(), and R.
Referenced by Inkscape::UI::Toolbar::SpiralToolbar::_attachRepr(), Inkscape::UI::Toolbar::StarToolbar::_attachRepr(), Inkscape::UI::Toolbar::Box3DToolbar::_attachRepr(), Inkscape::UI::Toolbar::ArcToolbar::_attachRepr(), Inkscape::UI::Toolbar::RectToolbar::_attachRepr(), Inkscape::UI::Tools::ConnectorTool::_setActiveShape(), Inkscape::UI::Tools::ConnectorTool::cc_set_active_conn(), create_text_with_rectangle(), Inkscape::Extension::Dependency::Dependency(), Inkscape::Extension::Extension::Extension(), SPObject::invoke_build(), move_child_nodes(), Inkscape::Extension::Internal::SvgBuilder::popGroup(), recursively_apply_style(), redundant_double_nesting_processor(), Inkscape::UI::ShapeEditor::set_item(), Inkscape::UI::Toolbar::ConnectorToolbar::setDesktop(), Inkscape::UI::Dialog::AttrDialog::setRepr(), sp_desktop_get_color_tool(), sp_tref_convert_to_tspan(), split_text_object_tree_at(), tidy_operator_inexplicable_spans(), and SPUse::unlink().
Increments the reference count of a anchored object.
This function template generates functions which take a pointer to a anchored object of a given type, increment that object's reference count, and return a pointer to the object of the same type as the function's parameter.
m | a pointer to anchored object |
Definition at line 110 of file gc-anchored.h.
References Inkscape::GC::Anchored::anchor(), and R.
|
inline |
Definition at line 119 of file gc-core.h.
References Inkscape::GC::Core::init().
Referenced by InkscapeApplication::InkscapeApplication(), InkviewApplication::InkviewApplication(), and XmlReprActionTest::XmlReprActionTest().
bool Inkscape::GC::operator!= | ( | Alloc< T1, scan1, collect1 > const & | , |
Alloc< T2, scan2, collect2 > const & | |||
) |
Definition at line 57 of file gc-alloc.h.
bool Inkscape::GC::operator== | ( | Alloc< T1, scan1, collect1 > const & | , |
Alloc< T2, scan2, collect2 > const & | |||
) |
Definition at line 50 of file gc-alloc.h.
Decrements the reference count of a anchored object.
This function template generates functions which take a reference to a anchored object of a given type, decrement that object's reference count, and return a reference to the object of the same type as the function's parameter.
The return value is safe to use since the object, even if its refcount has reached zero, will not actually be collected until there are no references to it in local variables or parameters.
m | a reference to a anchored object |
Definition at line 133 of file gc-anchored.h.
References R, and Inkscape::GC::Anchored::release().
Referenced by Inkscape::Extension::Internal::SvgBuilder::_addStopToGradient(), Inkscape::Extension::Internal::SvgBuilder::_addToContainer(), Inkscape::UI::Tools::EraserTool::_booleanErase(), SPGrid::_checkOldGrid(), Inkscape::UI::Tools::EraserTool::_clipErase(), Inkscape::Extension::Internal::SvgBuilder::_createClip(), Inkscape::Extension::Internal::SvgBuilder::_createGradient(), Inkscape::UI::Widget::CanvasGrid::_createGuide(), Inkscape::Extension::Internal::SvgBuilder::_createMask(), Inkscape::Extension::Internal::SvgBuilder::_createTilingPattern(), Inkscape::UI::Toolbar::ArcToolbar::_detachRepr(), Inkscape::UI::Toolbar::Box3DToolbar::_detachRepr(), Inkscape::UI::Toolbar::RectToolbar::_detachRepr(), Inkscape::UI::Toolbar::SpiralToolbar::_detachRepr(), Inkscape::UI::Toolbar::StarToolbar::_detachRepr(), Inkscape::Extension::Internal::SvgBuilder::_flushText(), Inkscape::Extension::Internal::SvgBuilder::_flushTextText(), Inkscape::UI::Tools::ConnectorTool::_flushWhite(), Inkscape::Extension::Internal::SvgBuilder::_getColorProfile(), SPDocument::_importDefsNode(), Inkscape::UI::Tools::EraserTool::_insertAcidIntoDocument(), Inkscape::Preferences::_load(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::Extension::Internal::SvgBuilder::_pushGroup(), Inkscape::UI::Tools::ConnectorTool::_setActiveShape(), Inkscape::UI::Tools::TextTool::_setupText(), Inkscape::Shortcuts::_write(), active_window_end_helper(), Inkscape::LivePathEffect::LPEPowerClip::add(), Inkscape::UI::Dialog::CPHistoryXML::add_action_parameter(), Inkscape::UI::Dialog::SvgFontsDialog::add_kerning_pair(), Inkscape::UI::Dialog::CPHistoryXML::add_operation(), Inkscape::UI::Widget::GradientSelector::add_vector_clicked(), Inkscape::Extension::Internal::SvgBuilder::addImageMask(), Inkscape::Extension::Internal::SvgBuilder::addMaskedImage(), Inkscape::UI::Tools::PencilTool::addPowerStrokePencil(), Inkscape::Extension::Internal::SvgBuilder::addSoftMaskedImage(), addStop(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::ObjectSet::breakApart(), Inkscape::Extension::build_from_file(), Inkscape::Extension::build_from_mem(), Inkscape::UI::Tools::ConnectorTool::cc_clear_active_conn(), Inkscape::UI::Tools::ConnectorTool::cc_clear_active_shape(), Inkscape::UI::Tools::ConnectorTool::cc_set_active_conn(), Inkscape::Shortcuts::clear_user_shortcuts(), Inkscape::ObjectSet::clone(), Inkscape::ObjectSet::cloneOriginalPathLPE(), Inkscape::ObjectSet::combine(), Inkscape::UI::Dialog::CPHistoryXML::CPHistoryXML(), SPClipPath::create(), SPMask::create(), Inkscape::Extension::Internal::Filter::create_and_apply_filter(), create_flowtext_with_internal_frame(), SPGrid::create_new(), SPFont::create_new_glyph(), create_text_with_inline_size(), create_text_with_rectangle(), Persp3D::create_xml_element(), Inkscape::LivePathEffect::Effect::createAndApply(), Inkscape::Extension::Implementation::Script::PreviewObserver::createAndSendEvent(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::ObjectSet::createBitmapCopy(), SPDocument::createDoc(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), SPDocument::createNewDocFromMem(), SPGuide::createSPGuide(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::LivePathEffect::LPEBool::divisionit(), Inkscape::UI::Tools::do_trace(), Inkscape::LivePathEffect::LPEBool::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doOnApply(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::ObjectSet::duplicate(), Inkscape::XML::SimpleDocument::duplicate(), Inkscape::Extension::Internal::BlurEdge::effect(), Inkscape::Extension::Internal::Filter::Filter::effect(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::Extension::Internal::Grid::effect(), file_import(), file_import_pages(), filter_add_primitive(), Inkscape::Extension::Internal::Filter::filters_load_file(), flowtext_to_text(), LivePathEffectObject::fork_private_if_necessary(), Inkscape::LivePathEffect::LPEBool::fractureit(), generate_linked_fill(), generate_marker(), Inkscape::Shortcuts::get_file_names(), Inkscape::UI::Dialog::get_first_style_text_node(), SPFlowtext::getAsText(), SPDocument::getNamedView(), Inkscape::ObjectSet::group(), insert_text_fallback(), item_to_paths(), Inkscape::loadImpl(), Inkscape::Extension::Internal::Filter::merge_filters(), modify_filter_gaussian_blur_from_item(), move_child_nodes(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::new_font(), Inkscape::PageManager::newPage(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::on_click_released(), Inkscape::Extension::Internal::GdkpixbufInput::open(), Inkscape::Extension::Internal::Svg::open(), Inkscape::Colors::paint_to_xml(), Inkscape::Colors::paint_to_xml_string(), Inkscape::UI::Toolbar::TextToolbar::prepare_inner(), SPPattern::produce(), Inkscape::Extension::Internal::SvgBuilder::pushPage(), SPStyle::readFromPrefs(), SPDocument::rebase(), recursively_apply_style(), InkscapeApplication::redirect_output(), redundant_double_nesting_processor(), redundant_semi_nesting_processor(), SPObject::releaseReferences(), SPGradient::repr_write_vector(), Inkscape::Preferences::reset(), Inkscape::Extension::Implementation::Script::PreviewObserver::selectionChanged(), Inkscape::UI::Tools::CalligraphicTool::set_to_accumulated(), Inkscape::ObjectSet::setClipGroup(), Inkscape::UI::Toolbar::ConnectorToolbar::setDesktop(), Inkscape::UI::Tools::MeasureTool::setGuide(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::ObjectSet::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::UI::Dialog::AttrDialog::setRepr(), SPObject::setTitleOrDesc(), show_output(), sp_copy_resource(), sp_document_default_gradient_vector(), sp_file_save_template(), sp_gradient_add_stop(), sp_gradient_fork_private_if_necessary(), sp_gradient_fork_vector_if_necessary(), sp_gradient_get_private_normalized(), sp_gradient_load_from_svg(), sp_gradient_reverse_vector(), sp_import_document(), sp_item_group_ungroup(), sp_item_list_to_curves(), sp_lpe_item_cleanup_original_path_recursive(), sp_marker_fork_if_necessary(), sp_marker_load_from_svg(), sp_repr_css_attr_unref(), sp_repr_do_read(), sp_repr_document_new(), sp_repr_svg_read_node(), sp_selected_item_to_curved_repr(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), sp_selection_paste_impl(), Inkscape::UI::Tools::sp_spray_recursive(), sp_te_insert(), sp_te_insert_line(), sp_te_set_repr_text_multiline(), sp_tref_convert_to_tspan(), sp_tref_update_text(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), sp_vector_add_stop(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Tools::spdc_flush_white(), Inkscape::LivePathEffect::LPESlice::split(), split_text_object_tree_at(), Inkscape::SelTrans::stamp(), text_flow_into_shape(), text_put_on_path(), text_to_glyphs(), text_unflow(), tidy_operator_inexplicable_spans(), Inkscape::ObjectSet::tile(), Inkscape::UI::Tools::MeasureTool::toItem(), Inkscape::LivePathEffect::LPECopyRotate::toItem(), Inkscape::LivePathEffect::LPETiling::toItem(), Inkscape::LivePathEffect::LPEMirrorSymmetry::toMirror(), Inkscape::ObjectSet::toSymbol(), Inkscape::LivePathEffect::LPEPowerMask::tryForkMask(), Inkscape::UI::Toolbar::TextToolbar::unindent_node(), SPUse::unlink(), Inkscape::UI::ShapeEditor::unset_item(), SPSymbol::unSymbol(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), verify_grad(), SPFilter::write(), SPFlowtext::write(), SPText::write(), SPTextPath::write(), SPTSpan::write(), SPDefs::write(), SPFlowdiv::write(), SPFlowtspan::write(), SPFlowpara::write(), SPFlowregion::write(), SPFlowregionExclude::write(), SPGradient::write(), SPGroup::write(), SPItem::write(), SPObjectGroup::write(), Inkscape::Colors::xml_string_to_paint(), Inkscape::UI::Dialog::CPHistoryXML::~CPHistoryXML(), Inkscape::Extension::Dependency::~Dependency(), Inkscape::Extension::Effect::~Effect(), Inkscape::Extension::Extension::~Extension(), Inkscape::Preferences::~Preferences(), and SPDocument::~SPDocument().
Decrements the reference count of a anchored object.
This function template generates functions which take a pointer to a anchored object of a given type, decrement that object's reference count, and return a pointer to the object of the same type as the function's parameter.
The return value is safe to use since the object, even if its refcount has reached zero, will not actually be collected until there are no references to it in local variables or parameters.
m | a pointer to a anchored object |
Definition at line 156 of file gc-anchored.h.
References R, and Inkscape::GC::Anchored::release().