Tricky REALBasic bug with assignment in DIM statement
Alex Lindsay
alindsay at mac.com
Tue Nov 16 16:07:10 CST 2004
I will be sending you the project directly to your email at this time.
If you do not receive it, please let me know.
On Nov 16, 2004, at 1:48 AM, Ruslan Zasukhin wrote:
> 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
> -------------------------------------------------------------
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list