destructors

destructors

此设置允许您提供一个或多个C函数在某些扩展生命周期事件上执行——具体来说,RSHUTDOWN(请求),PRSHUTDOWN (post请求),MSHUTDOWN (<0 >0 module</0 >1), <0 >2 GSHUTDOWN</0 >3 (<0 >4 globals</0 >5)。 Check the lifecycle hooks chapter for more information.

{
    "destructors": [
        {
            "request": [
                {
                    "include": "my/awesome/library.h",
                    "code": "c_function_for_shutting_down(TSRMLS_C)"
                },
                {
                    "include": "my/awful/library.h",
                    "code": "some_other_c_function_than_the_other_ones(TSRMLS_C)"
                }
            ],
            "post-request": [
                {
                    "include": "my/awesome/library.h",
                    "code": "c_function_for_cleaning_up_after_the_response_is_sent(TSRMLS_C)"
                }
            ],
            "module": [
                {
                    "include": "my/awesome/library.h",
                    "code": "release_module_deps(TSRMLS_C)"
                }
            ],
            "globals": [
                {
                    "include": "my/awesome/library.h",
                    "code": "release_globals_deps(TSRMLS_C)"
                }
            ]
        }
    ]
}

暂无相关搜索结果!