Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Finalizer tries to dispose objects, that belong to previous Runtime "generation" #1073

Closed
Assignees
lostmsu
@lostmsu

Description

@lostmsu

Environment

  • Pythonnet version: master
  • Python version: any
  • Operating System: any

Details

  1. InitializeRuntime
  2. Create a fewPyObjects, keep them somewhere
  3. ShutdownRuntime
  4. InitializeRuntime the second time
  5. Clear all alive reference to objects from step 2.
  6. CallGC.Collect andWaitForPendingFinalizers

Expected:XDecref should never be called on the handles inPyObjects from step 2.
Actual:XDecref is called on the handles inPyObjects from step 2.

I saw this happen even to .NET types reflected to Python likeSystem.MulticastDelegate. Will soon open a PR with repro.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp