Unable to find strong reference to an object using instrument - XCode 8
<p>Let's say I have root view controller A. Then I push view controller B. But after pop B, its not getting released (checked using dealloc method, which is not getting called upon popViewController. Please correct me if I'm wrong). I've done lot of search for this, and conclude that the most possible cause for this is 'strong reference to an object hold by view controller'. </p>

<p>I've tried using instrument's allocation tool using available tutorial  for finding out why my view controller is not getting released after popViewController or if there's any strong reference to an object.</p>

<p>Below is the result I got in instrument : </p>

<p><a href="https://i.stack.imgur.com/P3oGl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P3oGl.png" alt="enter image description here"></a>  </p>

<p>As in above screenshot, there are number of lines shown which I'm not getting.</p>

<p>My questions are :</p>

<ol>
<li><p>How to detect what causing view controller to not release after popViewController</p></li>
<li><p>If answer for 1st question is 'strong reference to an object hold by that view controller'. What exactly it is and how to detect it ?</p></li>
</ol>

<p>UPDATE :</p>

<p>Following is the code for navigating from login screen to dashboard</p>

<p><strong>LoginVC.h</strong></p>

<pre><code>#import &lt;UIKit/UIKit.h&gt;
#import "UIPaddingLabel.h"
..
.
.
@interface LoginVC : UIViewController
{
.
.
@property (weak) UIPaddingLabel *errorLbl;
.
.
.

@end
</code></pre>

<p><strong>LoginVC.m</strong></p>

<pre><code>    #import "LoginVC.h"
    #import "Dashboard.h"
    .
    .

    @interface LoginVC ()&lt;UITextFieldDelegate, UIAlertViewDelegate&gt;
    {
        CALayer *layer1, *layer2;

        UIAlertAction *actionToEnable;

        ANGModal *mod;

        UILabel *errMark1, *errMark2;

        UITextField *forgotTF;

        NSString *encodedString;

        UIImageView *backImgV;
        UIView *overlay;

        BOOL shouldAnimate;

        NSOperationQueue *operationQueue;


    }
    @end

    @implementation LoginVC

    .
    .

    //if login successful

    Dashboard *dashObj = [[Dashboard alloc] initWithNibName:@"Dashboard" bundle:nil];
    self.navigationController pushViewController:dashObj animated:YES];

    .
.
.
    -(void)dealloc
    {
        NSLog(@"Released... %s", __PRETTY_FUNCTION__);
    }

    @end
</code></pre>

<p><strong>Dashboard.h</strong></p>

<pre><code>#import &lt;UIKit/UIKit.h&gt;
#import "UIPaddingLabel.h"

@interface Dashboard : UIViewController

@property (weak, nonatomic) IBOutlet UILabel *alertCountLbl;

@property (weak, nonatomic) IBOutlet UICollectionView *scheduleCV;
@property (weak, nonatomic) IBOutlet UICollectionView *courseCV;

@property (weak, nonatomic) IBOutlet UIButton *menuBtn;
@property (weak, nonatomic) IBOutlet UIButton *nextScheduleBtn;

@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *spinner;

//iphone only
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIView *containerView;

@property (weak, nonatomic) IBOutlet UIImageView *sliderImageV;

@property (weak, nonatomic) IBOutlet UILabel *performCountLbl;
@property (weak, nonatomic) IBOutlet UIButton *performanceBtn;
@property (weak, nonatomic) IBOutlet UIButton *myBagBtn;
@property (weak, nonatomic) IBOutlet UIButton *storeBtn;
@property (weak, nonatomic) IBOutlet UIButton *groupsBtn;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgSliderTopAlign;

//ipad only
@property (weak, nonatomic) IBOutlet UILabel *headTitle;

@property (weak, nonatomic) IBOutlet UILabel *monthYearLbl;
@property (weak, nonatomic) IBOutlet UIButton *calBtn;
@property (weak, nonatomic) IBOutlet UICollectionView *calendarCV;

@property (weak, nonatomic) IBOutlet UIView *scheduleV;
@property (weak, nonatomic) IBOutlet UIButton *classBtn;
@property (weak, nonatomic) IBOutlet UIButton *homeBtn;
@property (weak, nonatomic) IBOutlet UIButton *todayBtn;
@property (weak, nonatomic) IBOutlet UIButton *plannedBtn;
@property (weak, nonatomic) IBOutlet UIButton *completedBtn;
@property (weak, nonatomic) IBOutlet UICollectionView *otherCV;

@property (weak, nonatomic) IBOutlet UILabel *onlineMarker;
@property (weak, nonatomic) IBOutlet UIButton *bottomBanner;
@property (weak, nonatomic) IBOutlet UIPaddingLabel *myCourseTitle;
@property (weak, nonatomic) IBOutlet UIButton *sdCardBtn;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *scheduleBarLeftSpace;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *calendarWd;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *otherCVBottomSpace;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *myCourseLeftSpace;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *myCourseRightSpace;


@end
</code></pre>

<p><strong>Dashboard.m</strong></p>

<pre><code>#import "Dashboard.h"
.
.
.

@interface Dashboard ()&lt;UICollectionViewDataSource, UICollectionViewDelegate, UIScrollViewDelegate, SideMenuDelegate, ANGModalDelegate, JTCalendarDelegate, RoboServicesInterfaceDelegate&gt;


@end

@implementation Dashboard
{
    CGPoint currentOffset;

    NSArray *scheduleRecord, *subjectsRecord;

    SideMenuVC *sideMenuObj;

    CALayer *titleLayer, *scheduleLayer;

    NSString *token;

    CGFloat calCellWd, calCellHt;

    NSDate* dateSelected;
    NSUInteger displayingDay, displayingMonth, displayingYear;

    NSMutableArray *datesArr;
    NSArray *weekDaysArr;

    ANGModal *mod;

    JTCalendarMenuView *menuV;
    JTHorizontalCalendarView *horizontalContent;
    JTCalendarManager *calendarManager;

    UIView *noScheduleV;

    BOOL dateChanged;

    NSString *dbPath;

    CGFloat otherCellSize;

    UIImageView *backImgV;

    NSString *userType;

    RoboLoaderController *_loaderController;
}

.
.
.

-(void)goBack
{
    [self.navigationController popViewControllerAnimated:YES];
}
.
.
.
-(void)dealloc
{
    NSLog(@"Released... %s", __PRETTY_FUNCTION__);
}
.
.
@end
</code></pre>

<p>Thanks !</p>