Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311466

Summary: Leaking accessible object
Product: [Eclipse Project] Platform Reporter: Silenio Quarti <Silenio_Quarti>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 3.6Flags: eclipse.felipe: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
fix none

Description Silenio Quarti CLA 2010-05-03 22:18:07 EDT
AccessibleFactory.createAccessible() should call gtk_widget_get_accessible() instead of atk_object_factory_create_accessible(). If it calls the former, the created atkobject has to be freed. This does not happen currently. The later is disposed when the widget is disposed.
Comment 1 Silenio Quarti CLA 2010-05-03 22:19:29 EDT
Created attachment 166895 [details]
fix
Comment 2 Felipe Heidrich CLA 2010-05-04 10:39:16 EDT
Does our AccessibleFactory#atkObjectFactory_create_accessible still get called ?

I thought we were releasing the reference in Accessible#release()->AccessibleObject->release();
(but for some reason we were only calling unref for lightweight)
Comment 3 Silenio Quarti CLA 2010-05-04 10:53:17 EDT
Yes, atkObjectFactory_create_accessible is still called.

There are two ways of creating an atkobject. The ones created for a widget should be create with gtk_widget_get_accessible() (which calls the factory method). These ones are released when the widget is destroyed.

The ones that are not associable to a widget (lightweigths) should be created with AccessibleFactory.createChildAccessible() and we have to released them.
Comment 4 Silenio Quarti CLA 2010-05-04 12:08:10 EDT
Fixed > 20100504.