Skip to content

Commit 933ced7

Browse files
committed
cleanup while tracking down memory leak
1 parent 3c7f39c commit 933ced7

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

app/src/processing/app/Base.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,8 @@ public boolean handleClose(Editor editor, boolean modeSwitch) {
10111011
Preferences.unset("server.port"); //$NON-NLS-1$
10121012
Preferences.unset("server.key"); //$NON-NLS-1$
10131013

1014-
// This will store the sketch count as zero
1015-
editors.remove(editor);
1014+
// // This will store the sketch count as zero
1015+
// editors.remove(editor);
10161016
// System.out.println("editors size now " + editors.size());
10171017
// storeSketches();
10181018

app/src/processing/app/SingleInstance.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121
*/
2222
package processing.app;
2323

24+
import java.awt.EventQueue;
2425
import java.io.BufferedReader;
2526
import java.io.IOException;
2627
import java.io.PrintWriter;
2728
import java.net.InetAddress;
2829
import java.net.ServerSocket;
2930
import java.net.Socket;
3031

31-
import javax.swing.SwingUtilities;
32-
3332
import processing.core.PApplet;
3433

3534

@@ -38,8 +37,6 @@
3837
* Processing from running simultaneously. If there's already an instance
3938
* running, it'll handle opening a new empty sketch, or any files that had
4039
* been passed in on the command line.
41-
*
42-
* @author Peter Kalauskas, Ben Fry
4340
*/
4441
public class SingleInstance {
4542
static final String SERVER_PORT = "instance_server.port";
@@ -58,7 +55,6 @@ static boolean alreadyRunning(String[] args) {
5855
}
5956

6057

61-
// static void startServer(final Platform platform) {
6258
static void startServer(final Base base) {
6359
try {
6460
final ServerSocket ss = new ServerSocket(0, 0, InetAddress.getByName(null));
@@ -75,11 +71,9 @@ public void run() {
7571
final BufferedReader reader = PApplet.createReader(s.getInputStream());
7672
String receivedKey = reader.readLine();
7773
Messages.log(this, "key is " + key + ", received is " + receivedKey);
78-
// Base.log(this, "platform base is " + platform.base);
7974

80-
// if (platform.base != null) {
8175
if (key.equals(receivedKey)) {
82-
SwingUtilities.invokeLater(new Runnable() {
76+
EventQueue.invokeLater(new Runnable() {
8377
public void run() {
8478
try {
8579
Messages.log(this, "about to read line");

core/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ X FX - loadPixels, updatePixels, get and set optimizations
2626
X https://github.com/processing/processing/pull/3725
2727
X FX - keep track of whether pixels are up to date
2828
X https://github.com/processing/processing/pull/3716
29+
X FX - improve key events
30+
X https://github.com/processing/processing/pull/3729
2931

3032

3133
known issues

0 commit comments

Comments
 (0)