diff src/DLD-FUNCTIONS/__init_fltk__.cc @ 12323:c8da31f12c1d

avoid using new to create temporary gl2ps_renderer object
author John W. Eaton <jwe@octave.org>
date Tue, 01 Feb 2011 15:55:44 -0500
parents 8cc154f45e37
children 85934e0fcce9
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc	Tue Feb 01 15:42:07 2011 -0500
+++ b/src/DLD-FUNCTIONS/__init_fltk__.cc	Tue Feb 01 15:55:44 2011 -0500
@@ -153,12 +153,13 @@
         setup_viewport (w (), h ());
       }
 
-    if ( print_fid > 0 )
+    if (print_fid > 0)
       {
-        opengl_renderer *rend = new glps_renderer (print_fid, print_term);
-        rend->draw (gh_manager::lookup (number));
+        glps_renderer rend (print_fid, print_term);
+
+        rend.draw (gh_manager::lookup (number));
+
         print_fid = -1;
-        delete rend;
       }
     else
       {