mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
cleanup while tracking down memory leak
This commit is contained in:
@@ -1011,8 +1011,8 @@ public class Base {
|
||||
Preferences.unset("server.port"); //$NON-NLS-1$
|
||||
Preferences.unset("server.key"); //$NON-NLS-1$
|
||||
|
||||
// This will store the sketch count as zero
|
||||
editors.remove(editor);
|
||||
// // This will store the sketch count as zero
|
||||
// editors.remove(editor);
|
||||
// System.out.println("editors size now " + editors.size());
|
||||
// storeSketches();
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
package processing.app;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
@@ -28,8 +29,6 @@ import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import processing.core.PApplet;
|
||||
|
||||
|
||||
@@ -38,8 +37,6 @@ import processing.core.PApplet;
|
||||
* Processing from running simultaneously. If there's already an instance
|
||||
* running, it'll handle opening a new empty sketch, or any files that had
|
||||
* been passed in on the command line.
|
||||
*
|
||||
* @author Peter Kalauskas, Ben Fry
|
||||
*/
|
||||
public class SingleInstance {
|
||||
static final String SERVER_PORT = "instance_server.port";
|
||||
@@ -58,7 +55,6 @@ public class SingleInstance {
|
||||
}
|
||||
|
||||
|
||||
// static void startServer(final Platform platform) {
|
||||
static void startServer(final Base base) {
|
||||
try {
|
||||
final ServerSocket ss = new ServerSocket(0, 0, InetAddress.getByName(null));
|
||||
@@ -75,11 +71,9 @@ public class SingleInstance {
|
||||
final BufferedReader reader = PApplet.createReader(s.getInputStream());
|
||||
String receivedKey = reader.readLine();
|
||||
Messages.log(this, "key is " + key + ", received is " + receivedKey);
|
||||
// Base.log(this, "platform base is " + platform.base);
|
||||
|
||||
// if (platform.base != null) {
|
||||
if (key.equals(receivedKey)) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
Messages.log(this, "about to read line");
|
||||
|
||||
@@ -26,6 +26,8 @@ X FX - loadPixels, updatePixels, get and set optimizations
|
||||
X https://github.com/processing/processing/pull/3725
|
||||
X FX - keep track of whether pixels are up to date
|
||||
X https://github.com/processing/processing/pull/3716
|
||||
X FX - improve key events
|
||||
X https://github.com/processing/processing/pull/3729
|
||||
|
||||
|
||||
known issues
|
||||
|
||||
Reference in New Issue
Block a user