mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
close Writer object from createWriter() (fixes #3705)
This commit is contained in:
@@ -1554,7 +1554,10 @@ public class JSONObject {
|
||||
|
||||
|
||||
public boolean save(File file, String options) {
|
||||
return write(PApplet.createWriter(file), options);
|
||||
PrintWriter writer = PApplet.createWriter(file);
|
||||
boolean success = write(writer, options);
|
||||
writer.close();
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user