diff options
author | 2025-03-21 20:05:43 -0700 | |
---|---|---|
committer | 2025-03-21 20:05:43 -0700 | |
commit | 1248ced0cad29018090e65e3762585cdd774e864 (patch) | |
tree | 2789f57ad33c7bf8a28df9ded872139adcf05ac7 /android/module.go | |
parent | 29e0a00b2a9010b7b30f004fb9f6a2ad7ea20bcb (diff) | |
parent | 716fc3438bce5e2018b47cf906195b4f9aecea5c (diff) |
Snap for 13256841 from 716fc3438bce5e2018b47cf906195b4f9aecea5c to 25Q2-release
Change-Id: I4c3a8288d87d662237450f7cb929abe4669668ca
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index ecd0f239c..c0abfd0a3 100644 --- a/android/module.go +++ b/android/module.go @@ -45,6 +45,14 @@ type Module interface { // For more information, see Module.GenerateBuildActions within Blueprint's module_ctx.go GenerateAndroidBuildActions(ModuleContext) + // CleanupAfterBuildActions is called after ModuleBase.GenerateBuildActions is finished. + // If all interactions with this module are handled via providers instead of direct access + // to the module then it can free memory attached to the module. + // This is a temporary measure to reduce memory usage, eventually blueprint's reference + // to the Module should be dropped after GenerateAndroidBuildActions once all accesses + // can be done through providers. + CleanupAfterBuildActions() + // Add dependencies to the components of a module, i.e. modules that are created // by the module and which are considered to be part of the creating module. // @@ -2387,8 +2395,12 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) }) } } + + m.module.CleanupAfterBuildActions() } +func (m *ModuleBase) CleanupAfterBuildActions() {} + func SetJarJarPrefixHandler(handler func(ModuleContext)) { if jarJarPrefixHandler != nil { panic("jarJarPrefixHandler already set") |