Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Azure Func Python Library: AppExtensionBase - potential small memory leak #1500

Closed
macieyng opened this issue May 22, 2024 · 1 comment
Assignees

Comments

@macieyng
Copy link

I'm referring to this code https://github.com/Azure/azure-functions-python-library/blob/dev/azure/functions/extension/app_extension_base.py#L65-L70

    @classmethod
    def pre_invocation_app_level(cls,
                                 logger: Logger,
                                 context: Context,
                                 func_args: typing.Dict[str, object] = {},
                                 *args,
                                 **kwargs) -> None:

and line func_args: typing.Dict[str, object] = {}, is troubling me, because code initializes default argument with mutable type. AFAIK that can cause a memory leak in general (https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments), but maybe in the context how it's run it's not a problem.

Not sure if this is a real problem. My app has some memory leaks, but it's not that painful, so I wasn't investigating it much.

@hallvictoria
Copy link
Contributor

Thanks for reporting this! The fix has been addressed and will be released in the latest library version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants