Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Add examples for FinalizationRegistry#2404

Merged
queengooborg merged 3 commits intomdn:mainfrom
NiedziolkaMichal:finalization-registry
Aug 2, 2023
Merged

Add examples for FinalizationRegistry#2404
queengooborg merged 3 commits intomdn:mainfrom
NiedziolkaMichal:finalization-registry

Conversation

@NiedziolkaMichal
Copy link
Copy Markdown
Member

Description

Those are interactive examples for FinalizationRegistry, its constructor, register() and unregister().

image
Examples for constructor and register() are the same.

image

Motivation

Additional details

Related issues and pull requests

@NiedziolkaMichal NiedziolkaMichal mentioned this pull request Jan 6, 2023
94 tasks
Copy link
Copy Markdown
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we show the same example on three pages in other places, but apart from that, it's a really nice example. I'll approve the code.

Comment on lines +14 to +20
(function allocateMemory() {
Array.from({ length: 50000 }, () => () => {});

if (!arrayCollected) {
setTimeout(allocateMemory, 2);
}
})();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really... Eye opening 😄

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions Bot added the idle Issues and pull requests with no activity for three months. label Mar 24, 2023
@Josh-Cena Josh-Cena added the Content:JS issues related to JavaScript examples. label Jul 31, 2023
@github-actions github-actions Bot removed the idle Issues and pull requests with no activity for three months. label Aug 1, 2023
@queengooborg queengooborg merged commit 6ba8cb7 into mdn:main Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Content:JS issues related to JavaScript examples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants