Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Windows] Embedded Python Memory Leaks #96853

Closed
@AlexSoft73

Description

@AlexSoft73

Hi dear Python team,

I am a building a c/c++ application for general purpose and I would like to have in the application the possibility of running “Python” scripting code. Python has proved to be a good programming language to deal with heavy Math as in AI.

Now when I embed Python in my application things go perfect, except for memory leaks!
As a sample by just issuing the following code leaves memory leaks of around (2Mb):

#definePY_SSIZE_T_CLEAN#definePy_LIMITED_API 0x03000000#include<Python.h>#pragma comment (lib,"python3.lib")intWINAPIwWinMain(HINSTANCEhInstance,HINSTANCEhPrevInstance,PWSTRpCmdLine,intnCmdShow){Py_InitializeEx(0);//For Embeded PythonPy_FinalizeEx();  ..Morecode..return0;}

Is there something I must do to cause Python to release all resources allocated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp