• 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.

    1. {
    2. "destructors": [
    3. {
    4. "request": [
    5. {
    6. "include": "my/awesome/library.h",
    7. "code": "c_function_for_shutting_down(TSRMLS_C)"
    8. },
    9. {
    10. "include": "my/awful/library.h",
    11. "code": "some_other_c_function_than_the_other_ones(TSRMLS_C)"
    12. }
    13. ],
    14. "post-request": [
    15. {
    16. "include": "my/awesome/library.h",
    17. "code": "c_function_for_cleaning_up_after_the_response_is_sent(TSRMLS_C)"
    18. }
    19. ],
    20. "module": [
    21. {
    22. "include": "my/awesome/library.h",
    23. "code": "release_module_deps(TSRMLS_C)"
    24. }
    25. ],
    26. "globals": [
    27. {
    28. "include": "my/awesome/library.h",
    29. "code": "release_globals_deps(TSRMLS_C)"
    30. }
    31. ]
    32. }
    33. ]
    34. }