Ejemplo n.º 1
0
	void releaseFunctionPtr() {
		if( released ) {
			return;
		}

		released = true;
		funcPtr.release();

		if( target ) {
			target->RemoveReference();
			target = NULL;
		}
	}
Ejemplo n.º 2
0
// Adds a brand-new item into this inventory.
void Inventory::AddItem(const Rocket::Core::String& name)
{
	if (document == NULL)
		return;

	Rocket::Core::Element* content = document->GetElementById("content");
	if (content == NULL)
		return;

	// Create the new 'icon' element.
	Rocket::Core::Element* icon = Rocket::Core::Factory::InstanceElement(content, "icon", "icon", Rocket::Core::XMLAttributes());
	icon->SetInnerRML(name);
	content->AppendChild(icon);

	// Release the initial reference on the element now that the document has it.
	icon->RemoveReference();
}