Doubt about initializing an object