Make the objfile destructor private
[deliverable/binutils-gdb.git] / gdb / solib.c
index 548367060a8a3f049adf836c3f59947a1ae06376..7eea732d61574cc9bb08b5da82c19d74011ae65e 100644 (file)
@@ -835,7 +835,7 @@ update_solib_list (int from_tty)
          /* Unless the user loaded it explicitly, free SO's objfile.  */
          if (gdb->objfile && ! (gdb->objfile->flags & OBJF_USERLOADED)
              && !solib_used (gdb))
-           delete gdb->objfile;
+           gdb->objfile->unlink ();
 
          /* Some targets' section tables might be referring to
             sections from so->abfd; remove them.  */
@@ -1312,7 +1312,7 @@ reload_shared_libraries_1 (int from_tty)
        {
          if (so->objfile && ! (so->objfile->flags & OBJF_USERLOADED)
              && !solib_used (so))
-           delete so->objfile;
+           so->objfile->unlink ();
          remove_target_sections (so);
          clear_so (so);
        }
This page took 0.025217 seconds and 4 git commands to generate.