[C++-SIG] Playing with CXX 5.0b

Barry Scott barry at scottb.demon.co.uk
Sun Dec 10 15:35:17 CET 2000


The dtor is run after finalize. Add some {} to make the str destruct before the finalize.

> //-------------------------------------------
> #include "stdafx.h"
> #pragma warning(disable: 4786)
> 
> 
> #include "..\CXX\Objects.hxx"
> #include "python.h"
> #include <iostream>
> 
> int main(int argc, char* argv[])
> {
> 	Py_Initialize();

	{	// init before here

> 	Py::String str("my string");

	}	// str destruct here, finalize after here

> 	Py_Finalize();
> 	return 0;
> }
> //-------------------------------------------

		Barry




More information about the Cplusplus-sig mailing list