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

Snowflake Client needs auto free memory mode. #67

Closed
smtakeda opened this issue Dec 13, 2017 · 1 comment
Closed

Snowflake Client needs auto free memory mode. #67

smtakeda opened this issue Dec 13, 2017 · 1 comment

Comments

@smtakeda
Copy link
Contributor

PHP has its own memory management APIs, i.e., ecalloc, efree, etc, so that allocated memories will be freed up in the end of request if it wants.
However, when a connection is not closed, while all memories allocated by PDO layers will be freed automatically, the memories in Snowflake Client layer won't be, because those memories are allocated SF_CALLOC and SF_FREE that currently simple mapping to the system functions calloc and free. This will yield memory leak.

Snowflake Client/Connector should have a mode that does similar to PHP memory manager such that the memories are automatically freed in each of snowflake_*term function calls.

@smtakeda
Copy link
Contributor Author

Alternatively would be it be good idea that the application can provide CALLOC, MALLOC, FREE call backs? This way, the application can specify the memory manager if desired.

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

1 participant