[Swfed-svn] swfed-svn [389] SWFEditor class の destructor が呼ばれない事がある為、 ( メモリリーク ) チェック用に _destroy_and_exit メソッドを追加。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 7日 (月) 14:25:00 JST


Revision: 389
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=389
Author:   yoya
Date:     2011-03-07 14:25:00 +0900 (Mon, 07 Mar 2011)

Log Message:
-----------
SWFEditor class の destructor が呼ばれない事がある為、(メモリリーク)チェック用に _destroy_and_exit メソッドを追加。

Modified Paths:
--------------
    trunk/src/php_swfed.c
    trunk/src/php_swfed.h


-------------- next part --------------
Modified: trunk/src/php_swfed.c
===================================================================
--- trunk/src/php_swfed.c	2011-03-07 04:00:12 UTC (rev 388)
+++ trunk/src/php_swfed.c	2011-03-07 05:25:00 UTC (rev 389)
@@ -55,6 +55,7 @@
     PHP_ME(swfed,  __construct, NULL, 0)
     PHP_ME(swfed,  input, NULL, 0)
     PHP_ME(swfed,  output, NULL, 0)
+    PHP_ME(swfed,  _destroy_and_exit, NULL, 0) // for debug
     PHP_ME(swfed,  getHeaderInfo, NULL, 0)
     PHP_ME(swfed,  setHeaderInfo, NULL, 0)
     PHP_ME(swfed,  getTagList, NULL, 0)
@@ -311,6 +312,13 @@
     RETURN_STRINGL(new_buff, len, 0);
 }
 
+PHP_METHOD(swfed, _destroy_and_exit) { // for debug
+    swf_object_t *swf = NULL;
+    swf = get_swf_object(getThis() TSRMLS_CC);
+    swf_object_close(swf);
+    exit(0);
+}
+
 PHP_METHOD(swfed, getHeaderInfo) {
     swf_object_t *swf = get_swf_object(getThis() TSRMLS_CC);
     array_init(return_value);

Modified: trunk/src/php_swfed.h
===================================================================
--- trunk/src/php_swfed.h	2011-03-07 04:00:12 UTC (rev 388)
+++ trunk/src/php_swfed.h	2011-03-07 05:25:00 UTC (rev 389)
@@ -47,6 +47,7 @@
 PHP_METHOD(swfed, __construct);
 PHP_METHOD(swfed, input);
 PHP_METHOD(swfed, output);
+PHP_METHOD(swfed, _destroy_and_exit); // for debug
 //
 PHP_METHOD(swfed, getHeaderInfo);
 PHP_METHOD(swfed, setHeaderInfo);



Swfed-svn メーリングリストの案内
Back to archive index