realbasic-plugins
[Top] [All Lists]

Re: REALLoadObjectMethod leaking memory?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: REALLoadObjectMethod leaking memory?
From: Alexander Traud <alexander dot traud at macnews dot de>
Date: Sun, 15 Jan 2006 12:20:27 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
> Tested with REALbasic 5.5.5, 2005r4 and 2006r1. Is there a trick? Tried
> unlocking the function pointer. No help. Bug?

Stripped down the code to the bare minimum. The method must be searched only
- finding and calling is not necessary. With this the leak is a bit smaller
and only a pointer to 'o' remains. However, after a while the application
quits in Mac OS 9 if App.Test() is called with an endless loop in
App.Open(). Is there a trick, which I miss?

#include "rb_plugin.h"

static void Test(REALobject instance)
{
    REALLoadObjectMethod(instance, "dummy(o As Object) As Object");
}

REALmethodDefinition Global_Method =
{
    (REALproc) Test, REALnoImplementation, "Test(Extends o As Object)"
};

void PluginEntry(void)
{
    REALRegisterMethod(&Global_Method);
}

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


From  Sun 15 Jan 2006 14:35:40 +0100
Return-Path: <realbasic-plugins-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
 with ESMTP (Eudora Internet Mail Server 3.1.3);
 Sun, 15 Jan 2006 07:36:11 -0600
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id 22C44101CC25; Sun, 15 Jan 2006 07:35:58 -0600 (CST)
X-Original-To: realbasic-plugins at lists dot realsoftware dot com
Delivered-To: realbasic-plugins at lists dot realsoftware dot com
Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de
        [80.67.18.13])
        by lists.realsoftware.com (Postfix) with ESMTP id D8F29101CC09
        for <realbasic-plugins at lists dot realsoftware dot com>;
        Sun, 15 Jan 2006 07:35:40 -0600 (CST)
Received: (qmail 25327 invoked from network); 15 Jan 2006 13:35:40 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 99 dot 
240])
        (envelope-sender <support at monkeybreadsoftware dot info>)
        by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP
        for <realbasic-plugins at lists dot realsoftware dot com>;
        15 Jan 2006 13:35:40 -0000
To: realbasic-plugins at lists dot realsoftware dot com (REALbasic Plugins)
In-Reply-To: <BFEFEE84 dot FEBB%alexander dot traud at macnews dot de>
From: support at monkeybreadsoftware dot info (Christian Schmitz)
Date: Sun, 15 Jan 2006 14:35:40 +0100
Message-ID: <1h97n6v dot o7ejqjd0g5muM%support at monkeybreadsoftware dot info>
Organization: Monkeybread Software Germany
X-Face: nrf3>{WQ6c&r+7 at e)"]0G60`-6ND^)I2mI%>)QGYa=9"=7jhd-g2|b3!>Al0+
        Ccb%xGQshhi|g at QU2$
User-Agent: MacSOUP/D-2.7 (Mac OS X version 10.4.4)
Subject: Re: REALLoadObjectMethod leaking memory?
X-BeenThere: realbasic-plugins at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot 
com>
Sender: realbasic-plugins-bounces at lists dot realsoftware dot com
Errors-To: realbasic-plugins-bounces at lists dot realsoftware dot com

Alexander Traud <alexander dot traud at macnews dot de> wrote:

> static void Test(REALobject instance)
> {
>     REALLoadObjectMethod(instance, "dummy(o As Object) As Object");

Does this match the RB declaration?

Mfg
Christian

-- 
Around eleven thousand functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin.
<http://www.monkeybreadsoftware.info/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>