kitech / php-go

Write PHP extension using go/golang. Zend API wrapper for go/golang.
882 stars 108 forks source link

fix pointer conflict cause go panic. #9

Closed nangong92t closed 8 years ago

nangong92t commented 8 years ago
https://github.com/kitech/php-go/issues/8

Signed-off-by: monkey nangong92t@gmail.com

kitech commented 8 years ago

I think the delete call has logic problem:

429 + delete(gext.objs_p, phpthis)

eg:

$d = new Demo(); $d->m1(); $d->m2();

when call $d->m2(), it can not find the correct gothis.

But, indeed should call delete sometime later.

nangong92t commented 8 years ago

try...add class __destruct?

kitech commented 8 years ago

yes, it is.