Tricky REALBasic bug with assignment in DIM statement

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Nov 16 11:48:18 CST 2004


On 11/16/04 5:21 AM, "Alex Lindsay" <alindsay at mac.com> wrote:

> Below is a description of a tricky problem I found with REALBasic
> 5.5.3.  Please note that this is NOT a Valentina bug but a problem with
> REALBasic.  Looks like REALBasic is planning on fixing this in version
> 6.0.  Please sign onto the bug report to make sure it isn't dropped:
> <http://www.realsoftware.com/feedback/viewreport.php?reportid=lgynrrfl>
> 
> First e-mail from me:
> 
> I tracked down an unusual problem last week where the reference counting
> behaved differently depending upon whether or not it was assigned as
> part of the Dim assignment.  VCursor is a Valentina cursor and
> GetCursor() is a method to get a reference to a new cursor.
> 
>  From memory:
> 
> First snippet:
> Sub MySub()
>     Dim cursor as VCursor = GetCursor()
>     cursor = nil
> End Sub
> 
> Second snippet:
> Sub MySub()
>     Dim cursor as Vcursor
>     cursor = GetCursor()
>     cursor = nil
> End Sub
> 
> In the first snippet, something is keeping a reference to the cursor
> until MySub() ends.  In the second snippet the cursor is released as
> soon as the the cursor = nil line is executed.  I know that this is the
> case since the cursor locks records and the locks are not released
> indicating a reference to the cursor exists somewhere.  It is like a
> hidden temporary variable exists and is holding a reference to the
> cursor.
> 
> This seems to be a bug and was a very tough one to track down!
> 
> Any one else see anything like this?  Or should I assume insanity on my
> part?

Hi Alex,

Can you reproduce this in the small separate project?
If yes then send to me for check


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list