On Jun 27, 2007, at 7:33 PM, Alfred Van Hoek wrote:
>
> Based on the notion that the retInstance comes from the RB
> environment, we really should not unlock it because once the event/
> interface method goes out of scope, RB will reduce the refcount on
> the retInstance, right?
No, the event has already exited, and there is no further cleanup to
be done. Both objects stored in byref parameters and return values
must be unlocked to prevent leaking.
HTH,
Jon
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
From Thu 28 Jun 2007 02:37:02 +0200
Return-Path: <realbasic-plugins-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
id 04DF03083F5A; Wed, 27 Jun 2007 17:37:13 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on
www.realsoftware.com
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=4.5 tests=AWL,BAYES_00 autolearn=ham
version=3.1.1
Received: from lists.realsoftware.com (m.realsoftware.com [66.116.103.65])
by xmail.realsoftware.com (Postfix) with ESMTP id 4DE013083F50;
Wed, 27 Jun 2007 17:37:09 -0700 (PDT)
Received: from real-software-mini.local (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP id 5141D40265C;
Wed, 27 Jun 2007 19:37:02 -0500 (CDT)
X-Original-To: realbasic-plugins at lists dot realsoftware dot com
Delivered-To: realbasic-plugins at lists dot realsoftware dot com
Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de
[80.67.29.7])
by lists.realsoftware.com (Postfix) with ESMTP id 9935D40264D
for <realbasic-plugins at lists dot realsoftware dot com>;
Wed, 27 Jun 2007 19:36:58 -0500 (CDT)
Received: (qmail 11437 invoked from network); 28 Jun 2007 00:37:02 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 77 dot
29])
(envelope-sender <support at monkeybreadsoftware dot de>)
by smtprelay07.ispgateway.de (qmail-ldap-1.03) with SMTP
for <realbasic-plugins at lists dot realsoftware dot com>;
28 Jun 2007 00:37:02 -0000
To: realbasic-plugins at lists dot realsoftware dot com (REALbasic Plugins)
In-Reply-To: <17644250-15DB-4A8C-8771-B4B9FCD84F9B at mac dot com>
Subject: Re: Unlocking or not?
From: support at monkeybreadsoftware dot de (Christian Schmitz)
Date: Thu, 28 Jun 2007 02:37:02 +0200
Message-ID: <1i0ecku dot u0akpvmvq20fM%support at monkeybreadsoftware dot de>
MIME-Version: 1.0
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.8 (Mac OS X version 10.4.9 (PPC))
X-BeenThere: realbasic-plugins at lists dot realsoftware dot com
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot
com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: realbasic-plugins-bounces at lists dot realsoftware dot com
Errors-To: realbasic-plugins-bounces at lists dot realsoftware dot com
Alfred Van Hoek <vanhoek at mac dot com> wrote:
> REALobject retInstance =3D nil;
> =
> if (_fp)
> { =
> retInstance =3D _fp(myInstance, theName);
> }
> =
> REALUnlockString(theName);
> =
> api =3D GetAPIIdentifier(retInstance);
> REALUnlockObject(retInstance); <------------------=
- necessary???
I think yes.
Functions return objects locked so the one using the result must unlock
it.
Gru=DF
Christian
-- =
Over 600 classes with 14000 functions in one REALbasic plug-in. =
The Monkeybread Software Realbasic Plugin v7.3. =
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|