Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak on every redraw with appointments in view #174

Open
GoogleCodeExporter opened this issue Apr 27, 2015 · 1 comment
Open

memory leak on every redraw with appointments in view #174

GoogleCodeExporter opened this issue Apr 27, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Memory leak on every doLayout() in DayView.addAppointmentsToGrid() and 
MonthView.layOnAppointment(). AppointmentWidgets are registered to the 
dragController, but never released. References kept in RegisteredDraggable 
objects in MouseDragHandlers dragHandleMap leave AppointmentWidget and all 
objects it references outside of reference counting garbage collection.

Steps to reproduce and verify:

1.open calendar in day view in Chromium, create an appointment
2.open the developer tools, take a Heap snapshot at the "Profiles" tab
3.get the doLayout() firing, change the view date back and forth for example 10 
times but so that the appointment is always in view
4.take another Heap snapshot at the "Profiles" tab
5.view the second heap snapshot in "Comparison" mode
6.find the "AppontmentWidget_0" object and check the delta column, you will 
notice that none have been deleted
7.check the "Object's retaining tree" to see that the reference is kept in a 
MouseDragHandler$RegisteredDraggable_0

Fix:

deregister the widgets from the dragController.

The attached patch to trunk/gwt-cal/ keeps the dragController registered widget 
refrences and deregisters them on the next doLayout(). Also the 
AppointmentWidget has to implement HasTouchStartHandlers and 
HasTouchEndHandlers because the MouseDragHandler.makeNotDraggable(Widget 
widget) will otherwise fire null pointer exceptions.

Original issue reported on code.google.com by [email protected] on 7 Feb 2013 at 10:04

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant