On Fri, Jun 26, 2015 at 11:29 AM, Emil Velikov <[email protected]> wrote: > Hmm I thought I've commented on this one, but here is goes:
I thought you had too :) But it's not in my e-mail, perhaps I started a discussion thread or had an earlier version of the patch? > > On 26 May 2015 at 00:51, Ilia Mirkin <[email protected]> wrote: >> Currently a piglit_report_result in init (or earlier) would cause the >> framework to not get torn down. This ensures that the teardown happens >> on exit, which also enables usage of valgrind to detect memory leaks. >> >> This is a refinment of commit 121fb6b7d84 for winsys and commit >> 50402d6c7 which introduced the fbo framework. >> >> Signed-off-by: Ilia Mirkin <[email protected]> > As piglit_report_result uses exit() rather than calling back to the > gl/cl framework, one needs to explicitly call the destructor > beforehand. So the message might come as a bit misleading. Perhaps one > day piglit_report_result() will can explicitly foo->destroy(), but > until then this looks great. FWIW I looked into doing this, but it was going to be a pain. piglit_report_result knows nothing of GL, and this is a GL-specific thing. One would have to create an abstract framework concept as well, and modify a ton of little things. This seemed easier :) > > Iirc older Windowses (~ Windows 2k era) had some problems with > atexit() but I'm pretty sure that Brian/Jose will give us some tips if > similar problems exist on supported platforms. > > Fwiw > Reviewed-by: Emil Velikov <[email protected]> Thanks! _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
