source: trunk/src/root.cc @ 318

Last change on this file since 318 was 266, checked in by epyon, 11 years ago
  • decoupling - uid_store independent of nv::object
  • decoupling - nv::object no longer linked with lua in any way
  • decoupling - gui::element related object methods moved to element
  • uid_store can operate on void* or specialized base class
  • root class no longer carries uid store nor lua state (will be removed later)
File size: 513 bytes
Line 
1// Copyright (C) 2012-2014 ChaosForge Ltd
2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6
7#include "nv/root.hh"
8
9#include "nv/uid.hh"
10#include "nv/lua/lua_state.hh"
11
12void nv::root::destroy_object( object* o )
13{
14        destroy_children( o );
15        o->detach();
16        delete o;
17}
18
19void nv::root::destroy_children( object* o )
20{
21        while ( !o->m_children.empty() )
22        {
23                destroy_object( o->m_children.front() );
24        }
25}
Note: See TracBrowser for help on using the repository browser.