RIght now, REALbasic has consistent, predictable automatic memory management, unlike, say, Cocoa. The WeakRef class fits nicely into this scheme. The introduction of weak object references (properties and variables) would likely require considerable reworking of memory management. Don't forget that method calls also affect reference counting. So what would happen when one passes a weak reference to a method? Probably this is a solvable problem, but it is certainly one that would require solving.
Actually, the parent-child problem is an easy one to solve, and it can usually be solved without resorting to weak references. Charles Yeomans On Apr 21, 2007, at 9:15 AM, Daniel Stenning wrote: > If your guess is right, then I fair enough - if it would take too > long andf > many other features ( or bug fixes ) could be implemented in the > same time > frame - then fair enough, but I still believe that in the future it > would be > worth doing as I say. Handling memory leakage is something so common - > particularly for the ubiquitous "parent-child" problem - that it > cries out > for an ELEGANT solution. > > If there are fundamental theoretical and linguistic objections to > my FR, > then I would be very happy to be enlightened about it too. > Providing its not > along the lines of "we wont do it that way because making it too > easy will > encourage misuse". > > > On 21/4/07 03:54, "Guyren Howe" <[EMAIL PROTECTED]> wrote: > >> On Apr 20, 2007, at 8:55 PM, Dean Davis wrote: >> >>> This has already been closed with comments. >>> This would be one of those time when it would be instructive if RB >>> could just let us know what they thought the pros and cons were of >>> each different design and why the weak ref class won out. >> >> I'm fairly certain it was "practical to implement now" vs "would >> require a major compiler re-architecting which is still in the 'some >> day' bucket". >> >> I'm just happy to have a useful weak reference now. This is the best >> language feature to come along in a very long time. >> >> Regards, >> >> Guyren G Howe >> Relevant Logic LLC >> >> guyren-at-relevantlogic.com ~ http://relevantlogic.com >> >> REALbasic, PHP, Ruby/Rails, Python programming >> PostgreSQL, MySQL database design and consulting >> Technical writing and training >> >> >> _______________________________________________ >> Unsubscribe or switch delivery mode: >> <http://www.realsoftware.com/support/listmanager/> >> >> Search the archives: >> <http://support.realsoftware.com/listarchives/lists.html> >> > > Regards, > > Dan > > > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
