Dear list,
I have a document based app which has a number of per-document background tasks
fired off timers. After moving from GC to ARC the app was suffering from
crashes when closing documents due to the referencing of deallocated objects.
So I've gone through the whole app and implemented -t
On Dec 7, 2012, at 10:18 PM, Steve Sisak wrote:
> At 8:57 PM -0600 12/7/12, Ken Thomases wrote:
>> > the outer if avoids the overhead of @synchronized if _someDictionary is
>> > already created -- this is just an optimization
>>>
>>> the inner if is necessary to resolve the race condition if mul
On Dec 7, 2012, at 8:18 PM, Steve Sisak wrote:
> I'm interested if there are an any issued I'm missing in the Obj-C,
> @synchronized(self), instance variable case.
Your pattern can fail if this line
_someDictionary = temp;
isn't atomic.
__
At 8:57 PM -0600 12/7/12, Ken Thomases wrote:
> the outer if avoids the overhead of
@synchronized if _someDictionary is already
created -- this is just an optimization
the inner if is necessary to resolve the race
condition if multiple threads make it past the
outer one
This is a classic
On Dec 7, 2012, at 8:01 PM, Steve Sisak wrote:
> Here's what I usually do:
>
> assume that _someDictionary is an instance variable initialized to nil and
> never changed once initialized to non-nil
>
> - (NSDictionary *)someDictionary;
> {
> if (!_someDictionary)
> {
>@synchronized (self)
At 7:56 PM +0700 11/12/12, Gerriet M. Denkmann wrote:
- (NSDictionary *)someDictionary;
{
static NSDictionary *someDictionary;
static dispatch_once_t justOnce;
dispatch_once( &justOnce, ^
{
// create a temp dictionary (might take som
On Dec 7, 2012, at 2:04 PM, Ken Thomases wrote:
> On Dec 7, 2012, at 3:08 PM, Greg Parker wrote:
>>
>> You can't assume that any instance variables of a newly initialized object
>> have been zeroed out when
>> * you are reading them from threads other than the one that allocated the
>> object a
Ariel
I have seen exactly this problem with the audio data property of AVAudioPlayer
- but it only seems to happen in simulator. On the device the data does does
get released correctly when the AVAudioPlayer instance is deallocated. I am
using ARC. I spent half a day making sure the data was no
On 12 Nov 2012, at 20:45, Greg Parker wrote:
>
>
> There is something special about statically-allocated memory.
> Statically-allocated memory has always been zero for the life of the process.
> Dynamically-allocated memory may have been non-zero at some point in the past
> (i.e. if it was
It's not directly what you need, but NSLogger might be worth looking
at. It sends realtime logs from an iOS device to the desktop:
https://github.com/fpillet/NSLogger
On Thu, Dec 6, 2012 at 10:59 AM, Eric E. Dolecki wrote:
> I'm about to embark on a local project that requires an iOS app to be
On 7 Dec 2012, at 17:40, Leonardo wrote:
> Hi,
> I am getting serious difficulties at drawing an attributed string within an
> attachmentCell and get it aligned on the baseline.
> I have a NSTextView. I add an attachment with its attachmentCell.
> In the method cellFrameForTextContainer I return
On Dec 7, 2012, at 3:08 PM, Greg Parker wrote:
> On Dec 7, 2012, at 7:03 AM, Jeremy Pereira wrote:
>> On 12 Nov 2012, at 20:45, Greg Parker wrote:
>>> There is something special about statically-allocated memory.
>>> Statically-allocated memory has always been zero for the life of the
>>> proc
On Dec 7, 2012, at 11:04 AM, Vavelin Kévin wrote:
> Yes I understand, I use NSInputStream and NSOutputStream for writing
> something but I don't know why I have my stream closed after an event
> hasSpaceAvailable or something like that.
But previously you said you get messages 2 and 4, which
On Dec 7, 2012, at 7:03 AM, Jeremy Pereira wrote:
> On 12 Nov 2012, at 20:45, Greg Parker wrote:
>> There is something special about statically-allocated memory.
>> Statically-allocated memory has always been zero for the life of the
>> process. Dynamically-allocated memory may have been non-ze
On Dec 7, 2012, at 1:11 PM, Alex Zavatone wrote:
> I think the general rule that the dimensions should be 2x the size of non
> retina items.
I know, but Apple's own Help Book icons all seem to be 64x64, which is 4x the
size (in each dimension), not 2x, which is why I'm confused.
Is there any
Yes I understand, I use NSInputStream and NSOutputStream for writing something
but I don't know why I have my stream closed after an event hasSpaceAvailable
or something like that. Here's my code and I send nothing to my stream.
- (void) initNetworkCommunication
{
CFReadStreamRefreadStr
Apple's Help Book documentation suggests using a 16x16 icon for the icon
pointed to by HPDBookIconPath:
https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/authoring_help/authoring_help_book.html#//apple_ref/doc/uid/TP3903-CH206-CIHDHGCJ
Howeve
On Dec 7, 2012, at 6:25 AM, Kévin Vavelin wrote:
> I tried CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault,
> (CFStringRef)@"neventy.fr", 80, &readStream, &writeStream);
>
> But it seems it doesn't work… I get 4 stream event (1 and 2)
That tells you the input and output streams are ope
On Dec 7, 2012, at 6:23 AM, Ariel Feinerman wrote:
> I have seen in leaks profiler the AVAudioPlayer make three retain and only
> two release of NSURL
Could you share a minimal amount of code that reproduces this leak?
--
David Duncan
___
Cocoa-dev
Hi,
I am getting serious difficulties at drawing an attributed string within an
attachmentCell and get it aligned on the baseline.
I have a NSTextView. I add an attachment with its attachmentCell.
In the method cellFrameForTextContainer I return a
cell.frame.height = font.ascender - font.descen
Top advice - and one step closer. I now have help in English and in Spanish.
Sadly, my French help is also in Spanish - which is rather confusing!
On 7 Dec 2012, at 13:54, Markus Spoettl wrote:
> On 12/7/12 2:34 PM, Pascal Harris wrote:
>> A weird issue this. I'm trying to Localize my app -
Hi there,
I want to create a socket.io tube between my iOS app and my server who's
running on node.js, I want to implement it for getting some now.js method and
get many many feature like my web page and my native app.
I tried CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault,
(CFStringRe
Hi,
I have seen in leaks profiler the AVAudioPlayer make three retain and only
two release of NSURL
--
best regards
Ariel
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Con
On 12/7/12 2:34 PM, Pascal Harris wrote:
A weird issue this. I'm trying to Localize my app - and, mostly, it's worked
like a charm. For some reason though, the help always gets delivered in the
English version. I have tried reindexing the help files - and now I'm out of
ideas (Google wasn't mu
A weird issue this. I'm trying to Localize my app - and, mostly, it's worked
like a charm. For some reason though, the help always gets delivered in the
English version. I have tried reindexing the help files - and now I'm out of
ideas (Google wasn't much help either!). Can anyone point me t
25 matches
Mail list logo