Minor improvements to fix for #1713.
This commit is contained in:
parent
673a9f39c6
commit
6e3c766749
@ -135,6 +135,15 @@ namespace irr
|
||||
return ReferenceCounter;
|
||||
}
|
||||
|
||||
//! Sets the reference count.
|
||||
/** Use with extreme caution, since using it incorrectly results in memory
|
||||
corruption or memory leaks. This method is only implemented for 'hollow'
|
||||
copies of ScalableFont (an STK extention). */
|
||||
void setReferenceCount(s32 n)
|
||||
{
|
||||
ReferenceCounter = n;
|
||||
}
|
||||
|
||||
//! Returns the debug name of the object.
|
||||
/** The Debugname may only be set and changed by the object
|
||||
itself. This method should only be used in Debug mode.
|
||||
|
@ -97,9 +97,7 @@ public:
|
||||
{
|
||||
ScalableFont* out = new ScalableFont(*this);
|
||||
out->m_is_hollow_copy = true;
|
||||
//FIXME: test only. Reset the reference counter of the copy to 1
|
||||
while (out->getReferenceCount() > 1)
|
||||
out->drop();
|
||||
out->setReferenceCount(1);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user