Hey,
Bug test case in the attachment.
--
// Dmitriy.
// Bug test case.
//
// How to reproduce: just run.
// How to crash: comment first assert(), run and stop.
//
// Gdb run command: run --docroot . --http-address 0.0.0.0 --http-port 8888
#include <Wt/WApplication>
#include <Wt/WDialog>
#include <cassert>
namespace {
class App : public Wt::WApplication
{
public:
App(const Wt::WEnvironment& env);
};
App::App(const Wt::WEnvironment& env)
: WApplication(env)
{
Wt::WObject* const o = new Wt::WDialog(root());
assert(o->parent() == root());
delete o; // This will NOT erase parent from WObject::children_
// and application exit will lead to second deletion.
assert(!o->parent());
}
Wt::WApplication* createApp(const Wt::WEnvironment& env)
{
return new App(env);
}
} // namespace
int main(int argc, char* argv[])
{
return Wt::WRun(argc, argv, createApp);
}
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest