Improved object lifecycle tracking and fix leaks.
diff --git a/libs/rs/rsElement.cpp b/libs/rs/rsElement.cpp
index e7ae247..a00fb52 100644
--- a/libs/rs/rsElement.cpp
+++ b/libs/rs/rsElement.cpp
@@ -24,12 +24,16 @@
 
 Element::Element(Context *rsc) : ObjectBase(rsc)
 {
+    mAllocFile = __FILE__;
+    mAllocLine = __LINE__;
     mComponents = NULL;
     mComponentCount = 0;
 }
 
 Element::Element(Context *rsc, uint32_t count) : ObjectBase(rsc)
 {
+    mAllocFile = __FILE__;
+    mAllocLine = __LINE__;
     mComponents = new ObjectBaseRef<Component> [count];
     mComponentCount = count;
 }