On 2011-02-15, at 11:34 AM, Fur Yao wrote:

> 
> It works fine.  But I found it will couse a lot of memory usage( without 
> Python about 20M and with Python it goes up to 50M or higher).
> 
> I want to know how to release the unnecessary memory usage~

When importing modules like "Foundation" or "Appkit" in Python, big files with 
metadata are loaded up. As long as you import those modules, you'll get this 
high memory usage. Addressing this problem is on PyObjC's roadmap, but its 
maintainer, Ronald, is pretty much the only one working on it, so development 
is slow.

If you want to reduce memory usage, you might have to convert a part of your 
code to Objective-C, yes. I wrote an article about that a while ago: 
http://www.hardcoded.net/articles/embedded-pyobjc.htm

> Or I have to rewrite all the python code to Objective-C~
> 
> And another question , if I use PyObjC in my project. Should I open my source?
> 

No, it's licensed under MIT.

Virgil
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to