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

Fix: Shared Blocks: State memory leak, each time inserter is opened new blocks are added #8153

Closed
wants to merge 1 commit into from

Conversation

jorgefilipecosta
Copy link
Member

@jorgefilipecosta jorgefilipecosta commented Jul 23, 2018

Each time the inserter was opened the shared blocks were requested and new blocks to represent them (used in their preview) were inserted.

Description

This PR adds a flag to all blocks that are inserted as part of the share blocks mechanism ( are not part of the document). This flag is useful to know each blocks are part of the document and which blocks are not part of the document.
When inserting new shared blocks we remove the previous blocks that contained that flag (we remove the previous share blocks).

How has this been tested?

Make sure you have some shared blocks (if not create some blocks before).
Write a post.
Add a block and write something.
Press the inserter.
Press the information icon and view the block count (it is high because all share blocks are counted even if they were not inserted in the document).
Press the inserter again.
View the block count again and verify it stayed the same (in master each time we open the inserter and check the block count the number increased).

@jorgefilipecosta jorgefilipecosta added [Type] Bug An existing feature does not function as intended [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Status] In Progress Tracking issues with work in progress labels Jul 23, 2018
@jorgefilipecosta jorgefilipecosta changed the title Fix: Shared Blocks: State memory leak, each time inserter is opened m… Fix: Shared Blocks: State memory leak, each time inserter is opened new blocks are added Jul 23, 2018
@jorgefilipecosta
Copy link
Member Author

Closing in favor of #7453, which will make this PR unnecessary.

@aduth aduth deleted the fix/shared-blocks-state-memory-leak branch January 25, 2019 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant