Skip to content

When are objects freed through auto_free #146

Answered by MikeSchulze
derkork asked this question in FAQ
Discussion options

You must be logged in to vote

Hi derkork,
Objects covered by auto_free live only in the scope where it is used.

Scopes are:

  • test suite setup
    • starts with before() and ends with after()
    • finally after after() is called the memory fill be auto freed.
  • test setup
    • starts with before_test() and ends with after_test()
    • finally after after_test() is called the memory fill be auto freed.
  • test
    • lives only inside test()`
    • finally after test() is called the memory fill be auto freed.

If this anwsers your question?
I will next improve the documentation to add the missing info.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@derkork
Comment options

@MikeSchulze
Comment options

@derkork
Comment options

Answer selected by derkork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
FAQ
Labels
documentation Improvements or additions to documentation clarified
2 participants