[futurebasic] Re: [FB] FBEditor: Xref @ (was: FB] FBtoC : Iterate folder on main list)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Fri, 18 Jan 2008 17:42:27 -0700
On Jan 18, 2008, at 5:35 PM, Brian Stevens wrote:

>
> On Jan 18, 2008, at 3:15 PM, Robert Purves wrote:
>> Three possible remedies:
>> [1] Ignore the warning as irritating but harmless.
>> [2] If your program is about to terminate, you don't need to  
>> dispose the array memory.
>> [3] Replace fn NewPtr() by fn malloc(), and DisposePtr() by fn free()
>
> After looking at editor code and finding an xref @ seemingly in  
> every function (not really), I'm wondering if there is some option  
> similar to #3 for an xref @ array of records. Besides rewriting  
> with pointers (which doesn't seem to have any benefits), option #1  
> is the most obvious choice. Any other suggestions?
>
> Just to refresh memories, there are many occurrences of code like:
>
> xref @ selArray(_maxLong) as DataBrowserItemID
> ...
> ...
> numSel = ( fn GetHandleSize(selArray) \ sizeof(DataBrowserItemID) ) -1
> ...
> ...
> call DisposeHandle( selArray )
>
>
> where gcc complains with a warning.
>
> Brian S.
>
> --
> To unsubscribe, send ANY message to: futurebasic- 
> unsubscribe@...
>

This was meant to be a private note to the FBtoC team. Sorry to  
bother the list with this. Please ignore.


Brian S.