Index: openacs-4/packages/eduwiki/tcl/eduwiki-xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/eduwiki/tcl/eduwiki-xowiki-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/eduwiki/tcl/eduwiki-xowiki-procs.tcl 7 Oct 2009 19:11:52 -0000 1.1 +++ openacs-4/packages/eduwiki/tcl/eduwiki-xowiki-procs.tcl 9 Nov 2009 19:06:04 -0000 1.2 @@ -24,10 +24,17 @@ } Package instproc destroy {} { - ::xowiki::Link instmixin delete ::eduwiki::EduWikiLink - ::xowiki::Page instmixin delete ::eduwiki::EduWikiPage - ::xowiki::WikiForm instmixin delete ::eduwiki::EduWikiForm - next + # + # In general, it is possible, that multiple eduwiki packages are + # concurrently active in one thread. We want to remove the mixin only, + # when the last instance is deleted. + # + if {[llength [[self class] allinstances]] == 1} { + ::xowiki::Link instmixin delete ::eduwiki::EduWikiLink + ::xowiki::Page instmixin delete ::eduwiki::EduWikiPage + ::xowiki::WikiForm instmixin delete ::eduwiki::EduWikiForm + } + next } Package instproc return_page {