File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -13,4 +13,8 @@ export class CubeDictionary {
13
13
resolveCube ( cubeName ) {
14
14
return this . byId [ cubeName ] ;
15
15
}
16
+
17
+ free ( ) {
18
+ this . byId = { } ;
19
+ }
16
20
}
Original file line number Diff line number Diff line change @@ -214,6 +214,15 @@ export class CubeSymbols {
214
214
this . evaluateViews = evaluateViews ;
215
215
}
216
216
217
+ public free ( ) {
218
+ this . symbols = { } ;
219
+ this . builtCubes = { } ;
220
+ this . cubeDefinitions = { } ;
221
+ this . funcArgumentsValues = { } ;
222
+ this . cubeList = [ ] ;
223
+ this . resolveSymbolsCallContext = undefined ;
224
+ }
225
+
217
226
public compile ( cubes : CubeDefinition [ ] , errorReporter : ErrorReporter ) {
218
227
this . cubeDefinitions = Object . fromEntries (
219
228
cubes . map ( ( c ) : [ string , CubeDefinition ] => [ c . name , c ] )
Original file line number Diff line number Diff line change @@ -335,6 +335,9 @@ export class DataSchemaCompiler {
335
335
if ( ! this . omitErrors ) {
336
336
this . throwIfAnyErrors ( ) ;
337
337
}
338
+ // Free unneeded resources
339
+ this . cubeDictionary . free ( ) ;
340
+ this . cubeSymbols . free ( ) ;
338
341
return res ;
339
342
} ) ;
340
343
}
Original file line number Diff line number Diff line change 7644
7644
"@smithy/util-uri-escape" "^4.0.0"
7645
7645
tslib "^2.6.2"
7646
7646
7647
- "@smithy/querystring-parser@^4.0.5":
7647
+ "@smithy/querystring-parser@^4.0.1", "@smithy/querystring-parser@^4.0. 5":
7648
7648
version "4.0.5"
7649
7649
resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-4.0.5.tgz#95706e56aa769f09dc8922d1b19ffaa06946e252"
7650
7650
integrity sha512-6SV7md2CzNG/WUeTjVe6Dj8noH32r4MnUeFKZrnVYsQxpGSIcphAanQMayi8jJLZAWm6pdM9ZXvKCpWOsIGg0w==
7651
7651
dependencies:
7652
7652
"@smithy/types" "^4.3.2"
7653
7653
tslib "^2.6.2"
7654
7654
7655
- "@smithy/service-error-classification@^4.0.7":
7655
+ "@smithy/service-error-classification@^4.0.1", "@smithy/service-error-classification@^4.0. 7":
7656
7656
version "4.0.7"
7657
7657
resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-4.0.7.tgz#24072198a8c110d29677762162a5096e29eb4862"
7658
7658
integrity sha512-XvRHOipqpwNhEjDf2L5gJowZEm5nsxC16pAZOeEcsygdjv9A2jdOh3YoDQvOXBGTsaJk6mNWtzWalOB9976Wlg==
You can’t perform that action at this time.
0 commit comments