473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Py_Finalize

Hi,
I embeded Python in a C++ application to support some scripts. I start it
using Py_Initialize() and after using running the scripts I call
Py_Finalize(). The problem that I experienced is that the memory usage of
the process doesn't decrease after the Py_Finalize().
If I call again Py_Initialize() and then load some modules, the memory usage
increase, but it never decrease when calling Py_Finalize().
How can I do a complete cleanup of the python heap?

Thanks on advanced,

Pablo Yabo

Jul 18 '05 #1
0 1296

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kari Hallfast | last post by:
Hi, I'm a C++ programmer and I have just recently decided to use Python as an embedded scripting language. I call Py_Initialize(), run a few scripts and call PyFinalize() which causes an unhandled...
1
by: Jerald | last post by:
Running python 2.3.4 on valgrind (a tool like purify which checks the use of uninitialized memory, etc), gives a lot of errors. See below. jfj@cluster:~/> python -V Python 2.3.4...
0
by: Roman Suzi | last post by:
In pure curiosity I tried to compile loop.c from Demo/embed and started it with 'print 2+2'. It seems, that both 2.3 and 2.4 pythons have memory leaks in Py_Initialize/Py_Finalize calls. (That is,...
3
by: brobigi | last post by:
well I manage to figure it out myself. I'm using Bloodshed Dev-cpp Here's the code: #include "python.h" #include <stdio.h> int main(int argc, char* argv) { double answer = 0;
0
by: Andrew Trevorrow | last post by:
Hi folks, I've only been using Python for a few weeks, so please be gentle. :) Lovely language by the way -- I really enjoying using it -- but I've struck a very nasty problem when running...
10
by: Andrew Trevorrow | last post by:
No response to my last message, so I'll try a different tack... Does anyone know of, or even better, has anyone here written a C++ application for Mac/Windows that allows users to run Python...
0
by: Ben Sizer | last post by:
Here's my test-case: #include <python.h> int main(int argc, char *argv) { Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); Py_Initialize();...
1
by: zaley | last post by:
Py_Finalize ERROR! In my C++ program ,python is embeded . I create one win thread to run embedded Python code . So at the begin of thread function I call "Py_Initialize" and at the end of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.