Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364092 - Some stylers not cleaned up when file input changes
Summary: Some stylers not cleaned up when file input changes
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 18:00 EST by Mark Macdonald CLA
Modified: 2011-11-17 18:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-11-17 18:00:22 EST
Orion 0.3

1. Open an HTML file in the editor.
2. Press Ctrl+Shift+R, type in the name of some other file dialog, then click on one of the results.
3. The editor will load the file you clicked. However, there's also a TypeError generated:

> TypeError
>   arguments: Array[2]
>     0: "destroy"
>     1: TextMateStyler
>   type: "undefined_method"

This is from the editor trying to destroy the old styler. It fails because TextMateStyler doesn't implement destroy(). This leaks 1 TextMateStyler instance each time.

All the stylers must implement destroy(). Listening to a "Destroy" event on the underlying TextView is not enough, because the editor reuses a single TextView as different files are loaded.
Comment 1 Mark Macdonald CLA 2011-11-17 18:03:03 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=72c5cb8d4f7871a1716e794822b923906a3b5eea

Also fixed a bug where one styler was not removing its listeners correctly.