mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Merge pull request #15797 from joaomoreno/reference-counted-models
Reference counted (workbench) text models
This commit is contained in:
@@ -187,8 +187,11 @@ export class MainThreadDocuments extends MainThreadDocumentsShape {
|
||||
}
|
||||
|
||||
private _handleAsResourceInput(uri: URI): TPromise<boolean> {
|
||||
return this._textModelResolverService.resolve(uri).then(model => {
|
||||
return !!model;
|
||||
return this._textModelResolverService.createModelReference(uri).then(ref => {
|
||||
const result = !!ref.object;
|
||||
ref.dispose();
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user