title: automatically store data by delegation (swift)
body: <pre><code>class BaseViewController: UIViewController,departmentMenuDelegate{
  var deptId1: NSMutableArray = []
  var deptSelectedIndexPath : NSIndexPath?
  var deptSelectedProfileName : String = ""
  
  func returnDeptId()-&gt; NSMutableArray
  {
      return deptId1
  }
  }
  
  class DepartmentMenuController: UIViewController,,UITableViewDataSource, UITableViewDelegate{
  var deptId: NSMutableArray = []
  
  var testing : Int = 0
  weak var delegate : departmentMenuDelegate?
  
  override func viewDidLoad() {
      super.viewDidLoad()
      deptId = (delegate?.returnDeptId())!
      deptId = ["suds","sdsds"]
  }
  }
  </code></pre>
  
  <p>Question 1: When I add value to deptId in DepartmentMenuController, it will automatically store the value to deptId in BaseViewController. why does it happen? If I remove deptId = (delegate?.returnDeptId())!, then the problem doesn't exist</p>
  
  <p>It just happen with NSMutableArray but not other types(e.g.String)</p>
  
  <p>Question2: For normal case, will that happen? I am wondering is it the problem in my program</p>