using System; public class Example { static Efl.GenericModel root, child2; // Create our test hierarchy static void ObjCreate() { // First create a root element root = new Efl.GenericModel(null); root.SetName("Root"); // Create the first child element var child = new Efl.GenericModel(root); child.SetName("Child1"); // Create the second child element, this time, with an extra reference child2 = new Efl.GenericModel(root); child2.SetName("Child2"); } // Destroy the test hierarchy static void ObjDestroy() { // Destroy the root element Console.WriteLine ("Deleting Root...\n"); root.Dispose(); // Destroy the child2 element, for which we were keeping an extra reference Console.WriteLine ("Deleting Child2...\n"); child2.Dispose(); } public static void Main() { Efl.All.Init(Efl.Components.Ui); // Create all objects ObjCreate(); // Destroy all objects ObjDestroy(); Efl.All.Shutdown(); } }