X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Futils.cpp;h=aa01f7b1cb4e1b258d29c917a694485eef8a73a9;hp=b55948b54c56a574f5c464140d0bccc922f1cfac;hb=f282e2b3a3873619006b6ffd3fa7fe65010c1299;hpb=83a7ee99a947cbbf331018b803ad6be43a9ccd45 diff --git a/ginac/utils.cpp b/ginac/utils.cpp index b55948b5..aa01f7b1 100644 --- a/ginac/utils.cpp +++ b/ginac/utils.cpp @@ -4,7 +4,7 @@ * but not of any interest to the user of the library. */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -388,12 +388,64 @@ library_init::library_init() library_init::~library_init() { if (--count==0) { - // In theory, we would have to clean up here. But since we were - // only initializing memory in the ctor and that memory is reclaimed - // anyways by the OS when the program exits, we skip this. + // It's really necessary to clean up, since the program + // lifetime might not be the same as libginac.{so,dll} one + // (e.g. consider // dlopen/dlsym/dlclose sequence). + // Let the ex dtors care for deleting the numerics! + _ex120.~ex(); + _ex_120.~ex(); + _ex60.~ex(); + _ex_60.~ex(); + _ex48.~ex(); + _ex_48.~ex(); + _ex30.~ex(); + _ex_30.~ex(); + _ex25.~ex(); + _ex_25.~ex(); + _ex24.~ex(); + _ex_24.~ex(); + _ex20.~ex(); + _ex_20.~ex(); + _ex18.~ex(); + _ex_18.~ex(); + _ex15.~ex(); + _ex_15.~ex(); + _ex12.~ex(); + _ex_12.~ex(); + _ex11.~ex(); + _ex_11.~ex(); + _ex10.~ex(); + _ex_10.~ex(); + _ex9.~ex(); + _ex_9.~ex(); + _ex8.~ex(); + _ex_8.~ex(); + _ex7.~ex(); + _ex_7.~ex(); + _ex6.~ex(); + _ex_6.~ex(); + _ex5.~ex(); + _ex_5.~ex(); + _ex4.~ex(); + _ex_4.~ex(); + _ex3.~ex(); + _ex_3.~ex(); + _ex2.~ex(); + _ex_2.~ex(); + _ex1.~ex(); + _ex_1.~ex(); + _ex1_2.~ex(); + _ex_1_2.~ex(); + _ex1_3.~ex(); + _ex_1_3.~ex(); + _ex1_4.~ex(); + _ex_1_4.~ex(); + _ex0.~ex(); } } +void library_init::init_unarchivers() { } + // comment skeleton for header files