gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unresolved Issues with libxml2


From: Richard Frith-Macdonald
Subject: Re: Unresolved Issues with libxml2
Date: Tue, 6 Mar 2012 10:48:34 +0000

On 6 Mar 2012, at 09:21, Wolfgang Lux wrote:
>> Under the current scheme, as long as the application holds a retain on any 
>> Obj-C object anywhere in the tree, the entire underlying tree structure and 
>> any other Obj-C objects that have been instantiated as part of it are kept 
>> in memory. When the final "external" (from outside of the tree) retain is 
>> released, the entire structure and all of the objects are freed. A fair bit 
>> of complexity internal to the framework to make using the framework simple.
>> 
>> So I'm disappointed to hear that Cocoa does it the cheap way! I appreciate 
>> that that approach will be simpler to implement and easier to understand the 
>> internal GNUstep code, but I wonder if it would be at all worthwhile at this 
>> point to allow a "WholeTreeIntegrity" flag to enable a developer to choose 
>> either memory behavior. Any thoughts?
> 
> I think keeping a pointer to the document root in the object is an easy 
> alternative to that. So I'm a bit skeptical whether the additional complexity 
> is really worth the effort. On the other hand, you already did invest much of 
> the effort :-)

Unfortunately, while the effort may have been made, the result was a scheme 
that was relatively hard to understand/maintain and depended on using methods 
that Apple have deprecated (yes we could keep them around indefinitely in base, 
but I think that's a poor idea in principle ... it's better to impose on 
ourselves the same sort of constraints that our users work under).

I think Fred's done great work to simplify the code (so we can more easily make 
it work with GC/ARC in future), and *check* that it actually works the same way 
as OSX.

Oftentimes I want to do things better than OSX, but even when it clearly *is* 
better to do things differently than Apple, it seems to cause us more trouble 
(with bug reports etc) than it's worth in the long run.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]