You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When releasing any vkvg object with vkvg_*_destroy methods, there is no way to guaranty effective disposal.
If destroy succeeds, the memory allocated to the object is freed, but with the actual api, there is no way to reset the pointer to 0 or NULL. So in that state, if the pointer is used again after release, this will lead to undefined behavior.
The solution would be to return the pointer from the destroy methods (either null or valid with count > 0) or to pass a pointer of the vkvgObject to the method:
When releasing any vkvg object with
vkvg_*_destroy
methods, there is no way to guaranty effective disposal.If destroy succeeds, the memory allocated to the object is freed, but with the actual api, there is no way to reset the pointer to 0 or NULL. So in that state, if the pointer is used again after release, this will lead to undefined behavior.
The solution would be to return the pointer from the destroy methods (either null or valid with count > 0) or to pass a pointer of the vkvgObject to the method:
The text was updated successfully, but these errors were encountered: