<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 12 May 2016 at 11:36, Miorelli, Federico <span dir="ltr"><<a href="mailto:Federico.Miorelli@cgg.com" target="_blank">Federico.Miorelli@cgg.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-family:Consolas">In one of my subroutines I'm calling DMDAGetAO to get the application ordering from a DM structure.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">After using it I was calling AODestroy.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Everything worked fine until I called the subroutine for the second time, when the program crashed.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Removing the call to AODestroy solved the crash.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Am I supposed to AODestroy the output of DMDAGetAO or not? I was worried that DMDAGetAO would allocate memory that I need to release.</span></p></div></div></blockquote><div><br></div><div>You are not supposed to call AODestroy() on the AO returned.<br></div><div>The pointer being returned is used internally by the DMDA.<br><br></div><div>Thanks<br></div><div> Dave<br></div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-family:Consolas"> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Federico<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#0093d0" lang="IT">______</span></b><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#6a737b" lang="IT">
</span></b><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#8cc63f" lang="IT">______</span></b><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#6a737b" lang="IT">
</span></b><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#fcb034" lang="IT">______</span></b><b><span style="font-size:18.5pt;font-family:"Arial","sans-serif";color:#6a737b" lang="IT"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="color:#404040" lang="IT">Federico Miorelli</span><span lang="IT"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d" lang="IT"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d" lang="IT">Senior R&D Geophysicist<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;color:#1f497d">Subsurface Imaging - General Geophysics
</span></b><b><span style="font-size:9.0pt;color:#1f497d">Italy</span></b><span style="font-size:8.0pt;color:#404040"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;color:#404040"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;color:#404040">CGG Electromagnetics (Italy) Srl<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><i><span style="font-size:7.0pt;font-family:"Arial","sans-serif";color:#6a737b" lang="EN-GB">This email and any accompanying attachments are confidential. If you received this email by mistake, please delete<br>
it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.<u></u><u></u></span></i></p>
</div>
</blockquote></div><br></div></div>