I'm working on my first real Core Data application and have been able to successfully pass the pointer to my managedObjectContext
instance throughout my application using segues. I've run into a question however as I am at a crossroad where I need to pass my managedObjectContext
into a function.
Question
Since functions are pass-by-value by default, I'm assuming that I'd be making a copy of my managedObjectContext instance thus potentially defeating the purpose of passing the original pointer to my managedObjectContext instance.
Should I use the inout
modifier to avoid creating copies of my managedObjectContext?