Re: [Pyobjc-dev] memory leak
Brought to you by:
ronaldoussoren
From: Daniel L. d. S. <dan...@gm...> - 2011-05-12 20:43:37
|
I am using version : faisca:~ dlsa$ python -c 'import objc; print(objc.__version__)' 2.2b3 On May 12, 2011, at 1:05 PM, Ronald Oussoren wrote: > > On 8 May, 2011, at 19:51, Daniel Luis dos Santos wrote: > >> Hello, >> >> I have some python code in a pyobjc app. At some point I want to initialize a NSString : >> >> string = NSString.alloc().init() > > Which version of pyobjc do you use? This works for me: > >>>> from Foundation import NSString > s = NSString.string>>> s = NSString.string() >>>> s > u'' >>>> s = NSString.alloc().init() >>>> s > u'' > > The PyObjC version can be found using: python -c 'import objc; print(objc.__version__)' > > Ronald > >> >> In the terminal I get the following output : >> >> /Users/dlsa/code/cirrusstore/client/build/cirrusclient.app/Contents/Resources/menubaractions.py:44: UninitializedDeallocWarning: leaking an uninitialized object of type NSPlaceholderString >> string = NSString.alloc().init() >> >> >> I have in my objective C bootstrap code the creation of an Auto release pool. >> >> If I try : >> >> string = NSString.alloc().init().autorelease() >> >> I get the same warning. >> >> Why does this happen ? >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |