ThatOpen / web-ifc-viewer

Graphics engine and toolkit for client applications.
MIT License
953 stars 236 forks source link

Feature request: disposal of a single model #147

Closed m1900 closed 1 year ago

m1900 commented 2 years ago

In my application I want to show only one model at a time. As soon as the user selects a different model, the old model should be disposed of so that the memory it occupys is cleared, while the scene and all other objects remain. I need a method that handles the disposal of the model for me, something like IfcManager.remove(model).

aka-blackboots commented 2 years ago

::take

agviegas commented 2 years ago

🟒🟒🟒

::take

Hi, @aka-blackboots! Thanks for taking this bounty! The due date is December 23, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

aka-blackboots commented 2 years ago

::drop

agviegas commented 2 years ago

🟒🟒🟒

::drop

Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.

D4ve-R commented 1 year ago

::take

agviegas commented 1 year ago

🟒🟒🟒

::take

Hi, @D4ve-R! Thanks for taking this bounty! The due date is February 21, 2023 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

D4ve-R commented 1 year ago

@agviegas can be marked as done, github's resolve comment somehow breaks the bot

agviegas commented 1 year ago

πŸ”΄πŸ”΄πŸ”΄

Hi, @D4ve-R! The date is past due, your assignment has been revoked. It’s now available for anyone to take.

agviegas commented 1 year ago

Hey @D4ve-R if you take this, I'll mark it as done. By the way, reviewing this code, I don't see if you are disposing the geometry and materials to prevent a memory leak. Are you doing that somewhere? That's a necessary step to get rid of models. Cheers!

aka-blackboots commented 1 year ago

@agviegas, looking at commits. Is this the step you're referring to? -> https://github.com/IFCjs/web-ifc-three/pull/144/commits/8149440fcefa01a5000683b73d80a92ae8e9f8d2

agviegas commented 1 year ago

@aka-blackboots that's right, thanks!

D4ve-R commented 1 year ago

@agviegas, not sure right now, will look into this.

D4ve-R commented 1 year ago

should be all good https://github.com/IFCjs/web-ifc-viewer/blob/9ce3a42cb8d4ffd5b78b19d56f3b4fad2d1f3c0e/viewer/src/components/ifc/ifc-manager.ts#L249

calls web-ifc-three's close method which handles disposal of geo & material

D4ve-R commented 1 year ago

::take

agviegas commented 1 year ago

🟒🟒🟒

::take

Hi, @D4ve-R! Thanks for taking this bounty! The due date is March 19, 2023 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas commented 1 year ago

::done

agviegas commented 1 year ago

🟒🟒🟒

::done

Hi, @D4ve-R! Thanks for your contributions! Please submit an expense to IFC.js Open Collective. Then, tell us the invoice number via the ::expense::_____ command (replace the _____ with the invoice number).

D4ve-R commented 1 year ago

::expense::125715

agviegas commented 1 year ago

🟒🟒🟒

::expense::125715

Hi, @D4ve-R! Thanks for the confirmation! We’ll proceed to review the expense. Once it’s approved, the payment will be scheduled.

agviegas commented 1 year ago

🟒🟒🟒

Hi, @D4ve-R! Your expense has been approved!

agviegas commented 1 year ago

πŸŽ‰πŸŽ‰πŸŽ‰

Hi, @D4ve-R! Thanks for your contributions! The reward of this bounty has been transferred to your Open Collective account.