Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311466 - Leaking accessible object
Summary: Leaking accessible object
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 22:18 EDT by Silenio Quarti CLA
Modified: 2010-05-04 12:08 EDT (History)
1 user (show)

See Also:
eclipse.felipe: review+


Attachments
fix (1.19 KB, patch)
2010-05-03 22:19 EDT, Silenio Quarti CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.