title: Can we delete an object passed as by reference?
body: <p>My code is as below</p>
  
  <pre><code> fun(int &amp;a)
   {
      delete &amp;a;
   }
  
   main()
   {
       int *a = new int(10);
       fun(*a);
   }
  </code></pre>
  
  <p>Can I delete memory assigned in main function and passed as by reference in fun and deleting memory in fun?
  Is it the right way?</p>