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

Fix memory leak in Recent #4044

Merged
merged 1 commit into from Oct 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 1 addition & 11 deletions app/src/processing/app/ui/Recent.java
Expand Up @@ -351,12 +351,6 @@ static class Record {
String path; // if not loaded, this is non-null
// EditorState state; // if not loaded, this is non-null

/**
* If currently loaded, this is non-null, and takes precedence over the
* path and state information, which will instead be stored actively by
* the actual sketch object.
*/
Editor editor;
// Sketch sketch;

// Record(String path, EditorState state) {
Expand All @@ -374,14 +368,10 @@ static class Record {
// }

Record(Editor editor) {
this.editor = editor;
this.path = editor.getSketch().getMainFilePath();
this(editor.getSketch().getMainFilePath());
}

String getName() {
if (editor != null) {
return editor.getSketch().getName();
}
// Get the filename of the .pde (or .js or .py...)
String name = path.substring(path.lastIndexOf(File.separatorChar) + 1);
// Return the name with the extension removed
Expand Down