lightspark/lightspark — comment on commit 7b064c2377c55b83a3a53e014799a852161ba023
File:  line 0
By mgehre:

Actually, GetStringFromObject is already implemented as
Class::coerce(obj)?

2012/2/6 Antti Ajanki
:
> Isn't there a memory leak in GetStringFromObject()? getInstanceS() in GetStringFromObject() creates a new object which is not decReffed anywhere.
>
> Maybe GetStringFromObject() could be replaced by obj->toString() because many methods will only access th->data. This would also fix the leak. Otherwise you should do obj->incRef() in the (obj->getObjectType() == T_STRING) branch and the caller should decRef the return value (or return _MR so that decRef happens automatically).
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/lightspark/lightspark/commit/7b064c2377c55b83a3a53e014799a852161ba023#commitcomment-937466