Skip to content
Discussion options

You must be logged in to vote

The transform struct is not actually a pointer so no need to free it.

If so, it must not be free at the same time as destroying the Transform instance.
All that is required is to set the Sprite instance to an instance variable of the Transform instance.

mrb_iv_set(mrb, transform_obj, iv_name1, sprite_obj); // NEED
mrb_iv_set(mrb, sprite_obj, iv_name2, transform_obj); // This case is for caching

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@pusewicz
Comment options

@dearblue
Comment options

@pusewicz
Comment options

@dearblue
Comment options

Answer selected by pusewicz
@pusewicz
Comment options

@dearblue
Comment options

@pusewicz
Comment options

@dearblue
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants