Leak in Icarousel memory leak - ios

https://github.com/nicklockwood/iCarousel/downloads
There is a memory leak for iCarousel how to resolve the issue.
I am using this in my application. so i need to resolve the memory issue [leak's] while using the iCarousel.

As per my experience before leak testing make sure “call tree” options is selected as well as for better result set Sampling option to 5.0 sec.
Actually in the testing we mostly concentrate open only those leaks which
Is generated within our code. So that’s why select “Show Obj-C Only” option from Call tree.
Follow these steps:
➢ Activate call tree block.(Choose Call Tree option from drop down menu on the clicking on Leaked Blocks option)
➢ Choose “Hide Missing Symbols” , “Hide System Libraries” and “Show Obj-C Only” option.

You can use many programs for debugging. for example, try Deleaker.

I think you should start with the plugin developers:
Pull a request there : https://github.com/nicklockwood/iCarousel/pulls
See :
You have better chances over there to find about your issue and i believe they will be interested with your case if iCarousel in involved .. if there is a case.

Related

Is it ok if I installed a cocoapod library in iOS project but never use it?

I installed pod JSQMessagesViewControllerin my Swift project but now I don't need it any more. I do not want to remove it to cause any side effect. Is it alright if I just leave it there and do nothing? Thanks!
Yes, it won't hurt anything. However, it will make the binary larger than it should be due to unused libraries. Also can be confusing later for others looking at the code why a particular library is there. But, the app will not break because of this.
If you aren't making any reference to this framework it shouldn't cause any side effect if you remove it. I really recommend you to remove anything that is no longer used. It's a good practice to avoid problems with future iOS versions when building your project and also makes your app lighter for users with a quicker download.
Just go ahead and remove the pod.
If you truly do not use it, your project will run without problems.
If you do actually use it without knowing about it, your app will most probably not compile, which is a great time to either remove the reference to the pod, or re-add it if you realize that you actually are using it.
If you do actually use it without knowing about it, your app may compile (e.g. if you refer to it from a xib or a storyboard), but will crash when trying to use the non-existing pod. This is much better than keeping on using the pod without knowing that it affects your project.
Good luck!

Watching memory usage in MonoTouch App

How can I find out how much memory my App is using from inside the app itself, using MonoTouch?
I basically want this:
Watching memory usage in iOS
which calls things like "task_info"
but for MonoTouch (it's OK if works only on iOS). I don't want a memory tool, like Instruments, etc, I just want to know the memory used from inside the App itself, so I can display it and be able to check it isn't too much in various field trials, etc.
I see at least two options:
Copy the "task_info" code into a new Xcode project and create a static library out of it. Then you link with that static library in your MonoTouch project, and use a P/Invoke to call logMemUsage.
Translate all the "task_info" code into C# (using P/Invokes to call native methods whenever required).
I would likely go for the first option, I believe it's somewhat less error prone.

How does Apples's own ASLR implementation work?

According to ASLR(Address Space Layout Randomization), It provides random stack and heap allocations and page load every time a process starts, and randomize the address where objects are placed in virtual space of a given process.
But in my application running on ios, i create an object named ObjectA, after several reload the process ,i found that the address of ObjectA is all the same ,no randomize.
How does Apples's own ASLR implementation work? Why ObjectA's address is all the same?
What you mean for "several reload"? You should explicitly quit the application, because of the multitasking you might reopen the same process.
eg.
This is one of my applications printing out the address of a UIViewController instance, as you can see the address of the object is different in every execution.
First run: <DCViewController: 0x13d4a0>
Second run: <DCViewController: 0x2880f0>
Third run: <DCViewController: 0x2a2050>
(I do not think this is the case but in XCode there's an option to enable PIE (Position Independent Executable) under "Build Settings" and it's called "Don't Create Position Indipendent Executables", you can find it easily but typing "pie" in the search box. This option should be set to No).
EDIT:
Moreover Xcode will only make PIE binaries if deployment target is >= 4.3
Hope this helps =)
For completeness, the guy who did the work to answer that question was Dino Zovi in Apple iOS 4 Security Evaluation. My apologies if someone else published before Dino (I am not aware of the work or who you are).
Zovi published his stuff well before Apple published iOS Security. Dino's work is still more complete.

Xcode ARC conversion tool issue

I'm running the ARC conversion tool for the first time. I've followed the instructions and dealt with all of the issues/erros in my files that the conversion tool finds before it will actually run. I also have several third party libraries that I've told ARC to skip by unchecking them in the Targets to Convert dialog. After running the tool it shows me a report of all the changed files but no files have been changed. Next I save and try to build the project only to find that I have nearly 1000 build errors due to all the calls to retain and release in my project. It's my understanding that the conversion tool is supposed to remove all calls to retain, release, and autorelease but that isn't the case for me.
Has anybody encountered this problem before and if so how did you solve it? Or is it my responsibility to remove all retains & releases from my app? If so I'm not sure what the point of the conversion tool is. Please advise.
Thanks in advance
I am about to try this on my own rather large project, so I may be back with more questions, but I found this that might help:
http://meandmark.com/blog/2011/11/xcode-4-2-convert-to-arc-troubleshooting/
Are you using GIT repositories for your code? It may not be converting due to the snapshot issue described.
This works better in case you allow it to continue building if errors encountered (Preferences - General). However, not all files are changed or converted completely anyway. But a few regulars will do the dirty job.
In case anyone wants to copy and paste;
\[([\[\w\s\]]+) autorelease\]

Bad Access at UIApplicationMain() if Keyboard's Correction is set to Default or Yes

In my project, there is a simple table view and search controller. Everything loads and works fine, until I type into the text field. It then crashes at UIApplicationMain(), with a stack track of several UIKeyboardInputImpl methods. On a whim, I decided to mess with the settings in IB for the Search Bar itself—turns out, setting the option for Correction to Default or Yes causes the crash. I've never seen this happen before, and I'm tempted to call this a bug in the SDK. Can anyone confirm or provide more insight?
Xcode 4 Project:
http://db.tt/V6POWik
I've downloaded and checked your sample project for all available options of Correction and it didn't crash. You should try cleaning your build and derived data just in case and try again. If you are sure that the problem is reproducible I would love to know the steps I need to take to reproduce the error/crash.
Bug in the SDK…not much that I can do.

Resources