The following warnings occurred:
Warning [2] Trying to access array offset on value of type null - Line: 4475 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 4475 errorHandler->error
/inc/class_session.php 505 my_strlen
/inc/class_session.php 360 session->create_session
/inc/class_session.php 75 session->load_guest
/global.php 55 session->init
/printthread.php 17 require_once
Warning [2] Undefined variable $mybb - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Attempt to read property "settings" on null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $forums - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $mybb - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Attempt to read property "settings" on null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $forums - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Undefined array key 3 - Line: 184 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 184 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/printthread.php 72 forum_permissions
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/printthread.php 72 forum_permissions
Warning [2] Undefined array key "canonlyviewownthreads" - Line: 78 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 78 errorHandler->error
Warning [2] Undefined array key "page" - Line: 86 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 86 errorHandler->error
Warning [2] Undefined variable $multipage - Line: 24 - File: printthread.php(163) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/printthread.php(163) : eval()'d code 24 errorHandler->error
/printthread.php 163 eval



jWork.ORG forums
Memory leak coming from vector 'iniFonts' in Graph.java - Printable Version

+- jWork.ORG forums (https://jwork.org/forum)
+-- Forum: DataMelt (/forumdisplay.php?fid=1)
+--- Forum: DataMelt bug report (/forumdisplay.php?fid=3)
+--- Thread: Memory leak coming from vector 'iniFonts' in Graph.java (/showthread.php?tid=10)



Memory leak coming from vector 'iniFonts' in Graph.java - jworkorg - 06-03-2011 11:17 PM

Sorry, I forgot to mention that every plots we display (every 1m30s) is displayed in the same HPlot canvas. Data is put in P1D objects and added to the first graph in a HPlot graph. Previous data is removed prior to adding.

In my HPlot wrapper, I have a font object that I use for every fonts needed by Graph:
Code:
public static final Font GRAPH_FONT = new Font(null, Font.PLAIN, 10);

At my display window initialization, I configure my HPlot correctly to match my needs. The internalPlotWindow object is my HPlot.
Code:
//Configure the display og the plot canvas.
        this.getInternalPlotWindow().setAttResizableAll(false);
        this.getInternalPlotWindow().setAxesRatioUse(false);
        this.getInternalPlotWindow().setBox(false);
        this.getInternalPlotWindow().setAutoRange(true);
        this.getInternalPlotWindow().setGrid(true);
        this.getInternalPlotWindow().setMarginSizeLeft(0.0);
        this.getInternalPlotWindow().setMarginSizeTop(0.0);
        this.getInternalPlotWindow().setMarginSizeRight(0.0);
        this.getInternalPlotWindow().setMarginSizeBottom(0.0);
        this.getInternalPlotWindow().setPenWidthAxis(1.0);
        this.getInternalPlotWindow().setTicFont(GRAPH_FONT);
        this.getInternalPlotWindow().setLegendFont(GRAPH_FONT);
        this.getInternalPlotWindow().setTicsMirror(false);
        this.getInternalPlotWindow().setTics(true);
        this.getInternalPlotWindow().setAxisPenTicWidth(1);
        this.getInternalPlotWindow().setNumberOfTics(true);
        this.getInternalPlotWindow().setNumberOfTics(Axis.X_AXIS, 10);
        this.getInternalPlotWindow().setNumberOfTics(Axis.Y_AXIS, 10);

        //Add the listeners to the graph for display functions
        this.getInternalPlotWindow().getJPlot().getGraph().addMouseWheelListener(th​is);
        this.getInternalPlotWindow().getJPlot().getGraph().addMouseListener(this);
        this.getInternalPlotWindow().getJPlot().getGraph().addMouseMotionListener(t​his);
        this.getInternalPlotWindow().getJPlot().getGraph().addKeyListener(this);
        this.getInternalPlotWindow().getJPlot().getGraph().setFocusable(true);
        this.getInternalPlotWindow().getJPlot().getGraph().requestFocusInWindow();

        this.getInternalPlotWindow().getJPlot().getGraph().addFocusListener(new FocusListener(){
            public void focusGained(FocusEvent e) {}
            public void focusLost(FocusEvent e) {
                //internalPlotWindow.getJPlot().getGraph().requestFocusInWindow();
            }
        });

When I add a plot to the graph, I do things that way:
Code:
this.getInternalPlotWindow().draw(newItem.getPlot());//getPlot() returns a P1D object of 16384 data points
   this.getInternalPlotWindow().setNameX(newItem.getCurrentEntry().getXunits().getU​nits(), GRAPH_FONT);
   this.getInternalPlotWindow().setNameY(newItem.getCurrentEntry().getYunits().getU​nits(), GRAPH_FONT);

And when I need to remove 1 of them, I cal the clearData() function of HPlot, then re-call the draw(P1D) method for the remaining plots I need to plot.