Hi Stefan,

Try:

CFRetain([NSNumber numberWithFloat:0.25])

It will crash

On Wed, Feb 18, 2015 at 6:39 PM, Stefan Bidigaray <[email protected]>
wrote:

> That's because CoreBase does not understand "small objects".  These are
> objects that have their contents stored as part of the pointer, instead of
> being an actual object.  Because they aren't actually objects, they don't
> have any reference counting.  Passing a small object around is like passing
> a int or double, and do not have to call malloc or free, making them very
> fast.
>
> I can implement a quick fix, but it might not until the weekend.  It would
> also be very helpful if you created a test case that I could include in the
> test suite.  Nothing fancy.  Or, if you're not familiar with the test
> suite, a simple program with the expected output.
>
> Thanks
>
> On Wed, Feb 18, 2015 at 6:16 PM, Amr Aboelela <[email protected]>
> wrote:
>
>> Hello,
>>
>> I found that [NSNumber numberWithFloat:] is not toll free bridged with
>> CoreFoundation
>> if you do CFRetain on an object result from [NSNumber numberWithFloat:]
>> it will crash, and if you do a retainCount on it, it will always give you -1
>>
>> I feel suspicious about this line:
>>
>> return boxDouble(aValue, SMALL_FLOAT_MASK);
>>
>> _______________________________________________
>> Discuss-gnustep mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>>
>>
>


-- 
Info about Islam: http://wikiz.info/islam
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to