iActiveRecord
iActiveRecord copied to clipboard
Leaks with NSDate
Faced with such a problem: with each operation with a base leak. Xcode Instruments indicates iActiveRecord [NSDate dateWithTimeIntervalSince1970:] and [NSDate dateWithTimeIntervalSinceNow:]
//on the Russian
Столкнулся с такой проблемой: при каждой операции с базой происходят утечки. Xcode Instruments указывает на iActiveRecord [NSDate dateWithTimeIntervalSince1970:] и [NSDate dateWithTimeIntervalSinceNow:]
Hi @wsnnn, could you describe steps to reproduce?
And which version do you use?
Hi! Download stable version 29.06.2013.
Here is the sample project. Tested on the iPad. The results are the same as above. http://yadi.sk/d/a4NYU6gV6P4-4
Thank you, I'll review it soon.
Could you try the new version from master
branch?
stable
branch have a lot of bugs, and now I've implemented AR with the new API
Here is #35 some discussion, also you may review ActiveTwitter
target.
P.S. or you can drop me on skype: debian.1101
Tried master. The same. Added class_getSubclasses
Fixed on stable
branch.
But I cannot reproduce this on master
...
By the way, ActiveTwitter uses old API http://search.twitter.com/search.json?q=test
f**k, I will fix it.
Maybe this will help http://yadi.sk/d/4C4WG0Qk6PIuM
stable ARTest(68825,0x3d1a0b88) malloc: *** error for object 0x1f5d4890: pointer being freed was not allocated. *** set a breakpoint in malloc_error_break to debug
I will review this at the evening.
Anyway, I highly recommend to use version from master
.
While I use master. Since AR is used in the life cycle very often, the leaks are very large.
I can't understand where is the problem. I had the same trace for stable, but master' trace looks good, without leaks.
Master shows on each call to the database: malloc: *** error for object 0x1f5d4890: pointer being freed was not allocated.
Have you called
[ActiveRecord applyConfiguration...
at the app start?
No
Could you try and leave a feedback?
Posted on your mail
Any thing new? I have this issue too.
+1
Update please?
Guys, could someone give me a test project with these leaks?
@AlexDenisov I sent you an email with a failing project presuming the email listed in the wiki is yours.
@alexgaribay, I've received your email and will review it soon, thanks.
Any updates on this? I am trying to set a property of type NSDate
to something, then update the entity, but it saves null.
@AlexDenisov
I think it wouldn't be a bad idea to save dates as timestamps (NSNumber) for now, at least until the problem is resolved.
@kirualex Yeah you could even save them as ISO8601
strings but that isn't solving the problem, I don't like spikes sitting somewhere in my app. Plus to that, changing even a small property like that results in a lot of refactor.
I still can't reproduce it nor on master branch, nor on stable.
@nemesis-fw, regarding your issue with null date: have you marked the property as @dynamic
?