Index: lemon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 295)
+++ lemon/lgf_reader.h	(revision 294)
@@ -518,8 +518,5 @@
         _use_nodes(false), _use_arcs(false),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -533,8 +530,5 @@
         _use_nodes(false), _use_arcs(false),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -1315,8 +1309,5 @@
         _use_nodes(false), _use_edges(false),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -1330,8 +1321,5 @@
         _use_nodes(false), _use_edges(false),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2107,8 +2095,5 @@
       : _is(new std::ifstream(fn.c_str())), local_is(true),
         _filename(fn) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2119,8 +2104,5 @@
       : _is(new std::ifstream(fn)), local_is(true),
         _filename(fn) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2405,8 +2387,5 @@
     LgfContents(const std::string& fn)
       : _is(new std::ifstream(fn.c_str())), local_is(true) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
@@ -2417,8 +2396,5 @@
     LgfContents(const char* fn)
       : _is(new std::ifstream(fn)), local_is(true) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
+      if (!(*_is)) throw IoError("Cannot open file", fn);
     }
 
Index: lemon/lgf_writer.h
===================================================================
--- lemon/lgf_writer.h	(revision 295)
+++ lemon/lgf_writer.h	(revision 294)
@@ -464,8 +464,5 @@
       : _os(new std::ofstream(fn.c_str())), local_os(true), _digraph(digraph),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -477,8 +474,5 @@
       : _os(new std::ofstream(fn)), local_os(true), _digraph(digraph),
         _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1031,8 +1025,5 @@
       : _os(new std::ofstream(fn.c_str())), local_os(true), _graph(graph),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1044,8 +1035,5 @@
       : _os(new std::ofstream(fn)), local_os(true), _graph(graph),
         _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1600,8 +1588,5 @@
     SectionWriter(const std::string& fn)
       : _os(new std::ofstream(fn.c_str())), local_os(true) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
@@ -1611,8 +1596,5 @@
     SectionWriter(const char* fn)
       : _os(new std::ofstream(fn)), local_os(true) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
+      if (!(*_os)) throw IoError("Cannot write file", fn);
     }
 
