File tree Expand file tree Collapse file tree 1 file changed +24
-13
lines changed
ydb/library/yql/dq/actors/compute Expand file tree Collapse file tree 1 file changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,28 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
202
202
}
203
203
}
204
204
205
+ ~TDqComputeActorBase () override {
206
+ if (Terminated) {
207
+ return ;
208
+ }
209
+ Free ();
210
+ }
211
+
212
+ void Free () {
213
+ auto guard = BindAllocator ();
214
+ if (!guard) {
215
+ return ;
216
+ }
217
+ #define CLEANUP (what ) decltype (what) what##_; what.swap(what##_);
218
+ CLEANUP (InputChannelsMap);
219
+ CLEANUP (SourcesMap);
220
+ CLEANUP (InputTransformsMap);
221
+ CLEANUP (OutputChannelsMap);
222
+ CLEANUP (SinksMap);
223
+ CLEANUP (OutputTransformsMap);
224
+ #undef CLEANUP
225
+ }
226
+
205
227
void InitMonCounters (const ::NMonitoring::TDynamicCounterPtr& taskCounters) {
206
228
if (taskCounters) {
207
229
MkqlMemoryQuota = taskCounters->GetCounter (" MkqlMemoryQuota" );
@@ -504,19 +526,8 @@ class TDqComputeActorBase : public NActors::TActorBootstrapped<TDerived>
504
526
}
505
527
}
506
528
507
- {
508
- if (guard) {
509
- // free MKQL memory then destroy TaskRunner and Allocator
510
- #define CLEANUP (what ) decltype (what) what##_; what.swap(what##_);
511
- CLEANUP (InputChannelsMap);
512
- CLEANUP (SourcesMap);
513
- CLEANUP (InputTransformsMap);
514
- CLEANUP (OutputChannelsMap);
515
- CLEANUP (SinksMap);
516
- CLEANUP (OutputTransformsMap);
517
- #undef CLEANUP
518
- }
519
- }
529
+ // free MKQL memory then destroy TaskRunner and Allocator
530
+ Free ();
520
531
}
521
532
522
533
if (RuntimeSettings.TerminateHandler ) {
You can’t perform that action at this time.
0 commit comments