- Notifications
You must be signed in to change notification settings - Fork768
Fixed CollectBasicObject test#1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
8d89411 to45c370aCompare
filmor left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can't you use one of the*Reference types instead ofIntPtr? It would be good to see at least in the code that we are talking about Python objects here.
| [Test] | ||
| [Ignore("Ignore temporarily")] | ||
| [Obsolete("GC tests are not guaranteed")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is NUnit aware of this attribute or does this just generate yet another compile-time warning? Does it help to retry the test usinghttps://docs.nunit.org/articles/nunit/writing-tests/attributes/retry.html?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
NUnit is not aware. This actually removes warning from the usage of other[Obsolete] code.
lostmsu commentedDec 11, 2020
@filmor not for the finalizer. |
Uh oh!
There was an error while loading.Please reload this page.
This contains two fixes, that must go along for the tests to pass:
CollectBasicObjectandCollectOnShutdowntests for Mono by fixingMakeAGarbagefunction to not keep the garbage on the stack during a conservative roots scan (looks like Mono scans some variables, that are already gone).Finalizerto only store raw pointers to python objects instead of instances ofIPyDisposableand thus replacing Dispose with reliable and simpleDecRef.This removes some functions from
Finalizer, which previously were public, but should not have been.