Commit Graph

6 Commits

Author SHA1 Message Date
Richard Heck
ead697d4b6 Deal with memory issue reported some time ago in connection with DocumentClass
objects. The problem that led to the leak is that these objects can be held in
memory long after the Buffer that created them is gone, mostly due to their
use in the CutStack. So they were previously held in a storage facility, the
DocumentClassBundle. Unfortunately, they were now being created too often,
especially by cloning. It's not really a leak, because they're accessible, but
we weren't ever destroying them.

This new approach uses a shared_ptr instead.

Thanks to Vincent for pointing out const_pointer_cast.
2012-05-31 12:34:29 -04:00
Jean-Marc Lasgouttes
af928c503d rework regexp processor magic ; make tr1 work with autotools
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34730 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-30 11:04:30 +00:00
Peter Kümmel
69036ced37 TR1: move TR1 check to config.h / buildsystem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34729 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-30 10:53:45 +00:00
Peter Kümmel
807fc1443a also use TR1 code for bind and shared_ptr when compiling with GCC >= 4.4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34600 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-05 11:06:13 +00:00
Peter Kümmel
5b916eb7c5 don't pollute the global namespace, move bind and shared_ptr into the lyx scope.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34264 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 15:56:20 +00:00
Peter Kümmel
c9b9748cee msvcUsing "using namespace std" with msvc10 makes also std::tr1::shared_ptr visible and generates conflicts with boost::shared_ptr.
Solution: don't use boost::shared_ptr for msvc10 (could also be extended  to several GCC versions)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34259 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:37:32 +00:00