Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete legacy object before reloading custom_script #1327

Merged
merged 1 commit into from Mar 29, 2023

Conversation

DiamondHunters
Copy link
Contributor

Legacy objects are automatically destructed after the creation of new objects.
It caused __init__ of new version script called before calling __del__ of old one.
This means that you cannot unregister old things before new module loading.
So we delete legacy object explicitly at there to ensure the correct call order.

Checklist

Which kind of PR do you create?

  • This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • Tests will be added after some discussion and review.

Changelog?

  • This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • The target branch is dev branch.

One last thing


Legacy objects are automatically destructed after the creation of new objects.
It caused `__init__` of new version script called before calling `__del__` of old one.
This means that you cannot unregister old things before new module loading.
So we delete legacy object explicitly at there to ensure the correct call order.

Signed-off-by: DiamondHunters <872482123@qq.com>
@DiamondHunters DiamondHunters changed the title Delete plugin object before reloading custom_script Delete legacy object before reloading custom_script Mar 17, 2023
@xwings xwings merged commit b667054 into qilingframework:dev Mar 29, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants