Author: rolf
Date: 2007-09-26 19:19:43 -0400 (Wed, 26 Sep 2007)
New Revision: 86457

Modified:
   trunk/moon/plugin/ChangeLog
   trunk/moon/plugin/plugin.cpp
   trunk/moon/src/ChangeLog
   trunk/moon/src/control.cpp
   trunk/moon/src/text.cpp
Log:
* plugin/plugin.cpp: Properly release a MoonlightObject.
* src/text.cpp: Unref a few newly created objects.
* src/control.cpp: Remove an unnecessary ref.

Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-09-26 23:08:04 UTC (rev 86456)
+++ trunk/moon/plugin/ChangeLog 2007-09-26 23:19:43 UTC (rev 86457)
@@ -1,3 +1,7 @@
+2007-09-27  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * plugin.cpp: Properly release a MoonlightObject.
+
 2007-09-26  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * plugin.cpp: PluginInstance::UrlNotify: delete the StreamNotify when 
we're

Modified: trunk/moon/plugin/plugin.cpp
===================================================================
--- trunk/moon/plugin/plugin.cpp        2007-09-26 23:08:04 UTC (rev 86456)
+++ trunk/moon/plugin/plugin.cpp        2007-09-26 23:19:43 UTC (rev 86457)
@@ -400,12 +400,12 @@
                DEBUGMSG ("NPN_Invoke succeeded");
                NPN_ReleaseVariantValue (&result);
 
-               return true;
+               retval = true;
        }
        else {
                DEBUGMSG ("NPN_Invoke failed");
        }
-
+       NPN_ReleaseVariantValue (&args [0]);
        NPN_ReleaseObject (object);
        
        return retval;

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-09-26 23:08:04 UTC (rev 86456)
+++ trunk/moon/src/ChangeLog    2007-09-26 23:19:43 UTC (rev 86457)
@@ -1,3 +1,8 @@
+2007-09-27  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * text.cpp: Unref a few newly created objects.
+       * control.cpp: Remove an unnecessary ref.
+
 2007-09-26  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * font.cpp (Layout): Include the space char on the line before

Modified: trunk/moon/src/control.cpp
===================================================================
--- trunk/moon/src/control.cpp  2007-09-26 23:08:04 UTC (rev 86456)
+++ trunk/moon/src/control.cpp  2007-09-26 23:19:43 UTC (rev 86457)
@@ -161,9 +161,6 @@
        real_object = (FrameworkElement *) element;
        real_object->parent = this;
 
-       // sink the ref, we own this
-       base_ref (real_object);
-
        real_object->Attach (NULL,this);
        real_object->UpdateTotalOpacity ();
        real_object->UpdateTransform ();

Modified: trunk/moon/src/text.cpp
===================================================================
--- trunk/moon/src/text.cpp     2007-09-26 23:08:04 UTC (rev 86456)
+++ trunk/moon/src/text.cpp     2007-09-26 23:19:43 UTC (rev 86457)
@@ -800,17 +800,19 @@
                Run *run = new Run ();
                if (value)
                        run_set_text (run, value->AsString ());
-               
+
                Inlines *inlines = text_block_get_inlines (this);
                
                if (!inlines) {
                        inlines = new Inlines ();
                        text_block_set_inlines (this, inlines);
+                       inlines->unref ();
                } else {
                        inlines->Clear ();
                }
                
                inlines->Add (run);
+               run->unref ();
                return;
        }
        

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to