summaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/vncviewer/VncViewer.java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2014-01-11 23:07:42 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2014-01-11 23:07:42 +0000
commitd121c1430dd55da0a1ca6160606cc180946f2401 (patch)
tree3a65805242eb55e2902fb572e6545cf4eb6f9280 /java/com/tigervnc/vncviewer/VncViewer.java
parent79055f7ba6655efa87a119659ddb290b6d85c9ab (diff)
downloadtigervnc-d121c1430dd55da0a1ca6160606cc180946f2401.tar.gz
tigervnc-d121c1430dd55da0a1ca6160606cc180946f2401.zip
r5138 did not completely resolve the problem with clipboard data consuming too much heap space. Large amounts of clipboard data could still cause the heap size to grow to huge sizes. This patch tries to address the problem by opening a Reader to the underlying IO stream and then reading only up to MaxCutText characters. The garbage collector is invoked manually rather than waiting for the JVM to do it in order to prevent the heap size from growing in between JVM invoked garbage collections.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5155 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/vncviewer/VncViewer.java')
-rw-r--r--java/com/tigervnc/vncviewer/VncViewer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/tigervnc/vncviewer/VncViewer.java b/java/com/tigervnc/vncviewer/VncViewer.java
index 8d9b23a6..87820e3c 100644
--- a/java/com/tigervnc/vncviewer/VncViewer.java
+++ b/java/com/tigervnc/vncviewer/VncViewer.java
@@ -561,7 +561,7 @@ public class VncViewer extends javax.swing.JApplet
= new BoolParameter("SendClipboard",
"Send clipboard changes to the server",
true);
- IntParameter maxCutText
+ static IntParameter maxCutText
= new IntParameter("MaxCutText",
"Maximum permitted length of an outgoing clipboard update",
262144);