Re: [webkit-dev] Memory Management of Webkit on MacOS

2009-05-20 Thread Darin Adler

On May 20, 2009, at 9:33 AM, Lucius Fox wrote:

Sorry. I meant does Webkit on MacOS X uses 'reference counted or  
garbage collected' memory management?


Both.

For Objective-C objects it uses whatever mode of memory management the  
host application chooses. This is also how Mac OS X system frameworks  
like AppKit behave.


For its own non-Objective-C objects it uses both reference counting  
and garbage collection.


-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Memory Management of Webkit on MacOS

2009-05-20 Thread Simon Fraser

On May 20, 2009, at 10:11 AM, Darin Adler wrote:


On May 20, 2009, at 9:33 AM, Lucius Fox wrote:

Sorry. I meant does Webkit on MacOS X uses 'reference counted or  
garbage collected' memory management?


Both.

For Objective-C objects it uses whatever mode of memory management  
the host application chooses. This is also how Mac OS X system  
frameworks like AppKit behave.


For its own non-Objective-C objects it uses both reference counting  
and garbage collection.


And the underlying WebCore C++ code uses both manual new/delete, and  
reference counting via the RefPtr class.


Simon

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Memory Management of Webkit on MacOS

2009-05-20 Thread Lucius Fox
On Fri, May 15, 2009 at 10:22 AM, Darin Adler da...@apple.com wrote:
 The WebKit framework on Mac OS X supports either mode, reference counted or
 garbage collected, depending on the mode of the application it’s linked to.

-- Darin


Thanks. Sorry. I meant does Webkit on MacOS X uses 'reference counted
or garbage collected' memory management?
Not 'if my MacOS application which uses Webkit can use 'reference
counted or garbage collected' memory management?

Thank you.


On Fri, May 15, 2009 at 10:22 AM, Darin Adler da...@apple.com wrote:
 The WebKit framework on Mac OS X supports either mode, reference counted or
 garbage collected, depending on the mode of the application it’s linked to.

    -- Darin


Thanks. Sorry. I meant does Webkit on MacOS X uses 'reference counted
or garbage collected' memory management?
Not 'if my MacOS application which uses Webkit can use
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] Memory Management of Webkit on MacOS

2009-05-15 Thread Lucius Fox
My understanding of Webkit on MacOS uses Objective-C runtime.
Does Webkit on MacOS use memory management of Objective-C runtime.

It said
Objective-C 2.0 offers two environments for memory management that
allow you to meet these goals:
 ■ Reference counting, where you are ultimately responsible for
determining the lifetime of objects.
Reference counting is described in Memory Management Programming Guide
for Cocoa.
 ■ Garbage collection, where you pass responsibility for determining
the lifetime of objects to an automatic
collector.

Does Webkit on MacOs use either one of them or it has its own memory management.

Thank you.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Memory Management of Webkit on MacOS

2009-05-15 Thread Darin Adler
The WebKit framework on Mac OS X supports either mode, reference  
counted or garbage collected, depending on the mode of the application  
it’s linked to.


-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev