mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
40
test/leaks/index.html
Normal file
40
test/leaks/index.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Leak Test Bed</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<button id="alloc">Alloc</button>
|
||||
<button id="dealloc">Dealloc</button>
|
||||
|
||||
<script src="/static/vs/loader.js"></script>
|
||||
<script>
|
||||
require.config({ baseUrl: '/static' });
|
||||
|
||||
require(['vs/base/browser/event'], ({ domEvent }) => {
|
||||
let event;
|
||||
let listener;
|
||||
|
||||
function alloc() {
|
||||
event = domEvent(document.body, 'mousemove');
|
||||
listener = event(e => console.log(e));
|
||||
}
|
||||
|
||||
function dealloc() {
|
||||
listener.dispose();
|
||||
listener = null;
|
||||
event = null;
|
||||
}
|
||||
|
||||
const allocBtn = document.getElementById('alloc');
|
||||
allocBtn.onclick = alloc;
|
||||
|
||||
const deallocBtn = document.getElementById('dealloc');
|
||||
deallocBtn.onclick = dealloc;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user