From c2daf6ff5a0ed4ea5d825b48c1e9466e19f0f81d Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 5 Jan 2015 10:47:09 +0100 Subject: Comment out error message about style ref counting and add explanation. (bzr r13838) --- src/sp-object.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 059fa8093..7d24a978e 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -151,9 +151,14 @@ SPObject::~SPObject() { // Conjecture: style pointer is never NULL. std::cerr << "SPObject::~SPObject(): style pointer is NULL" << std::endl; } else if( style->refCount() > 1 ) { - // Several classes ref style. // Conjecture: style pointer should be unreffed by other classes before reaching here. - std::cerr << "SPObject::~SPObject(): someone else still holding ref to style" << std::endl; + // Conjecture is false for SPTSpan where ref is held by InputStreamTextSource. + // As an additional note: + // The outer tspan of a nested tspan will result in a ref count of five: one for the + // TSpan itself, one for the InputStreamTextSource instance before the inner tspan and + // one for the one after, along with one for each corresponding DrawingText instance. + // std::cerr << "SPObject::~SPObject(): someone else still holding ref to style" << std::endl; + // sp_style_unref( this->style ); } else { delete this->style; -- cgit v1.2.3