Re: More on closing Oracle ref cursors



Charles Jardine said:

> I am still convinced that Michael should not need explicitly to
> close his cursors. I would be interested to know if tracing shows
> his cursors being destroyed in a timely fashion, since I suspect
> that something may be maintaining references to the DBI handles for
> longer than necessary.

and Charles Jardine also said:

> Note that bind_param_inout creates a reference from the pl/sql
> statement handle to the cursor statement handle, so the last
> cursor retrieved will not be destroyed until the pl/sql handle
> is destroyed.

OK. This sounds like we might be getting somewhere. I agree that it
sounds like something is keeping a reference to the cursor statement
handle. What you're saying, I believe, is that after

$sth1->bind_param_inout(':curref', \$sth2, 0, { ora_type => ORA_RSET }
);

I have a ref cursor statement handle in $sth2, but $sth1, the pl/sql
statement handle, *also* keeps a reference to the ref cursor statement
handle. Is that correct?

I'm going to go through my code again this morning and see if I can
figure out what might be keeping references open. In general, what would
be a good way of tracing or otherwise checking on where I'm leaking
references? I've tried using DBI->trace, and that works, but it's not
the easiest way to track what has references to what. Does anyone know
of a better way of tracking Perl references?

Mike

.



Relevant Pages

  • Re: More on closing Oracle ref cursors
    ... I would be interested to know if tracing shows his cursors being destroyed in a timely fashion, since I suspect that something may be maintaining references to the DBI handles for longer than necessary. ... statement handle to the cursor statement handle, so the last cursor retrieved will not be destroyed until the pl/sql handle is destroyed. ... Note we are within the second call of bind_param_inout <- DESTROY= undef at perl2 line 18 ...
    (perl.dbi.users)
  • Re: Dealing with a new codebase
    ... Once it had finished updating, I felt like I was watching a movie every time I moved the cursor or typed anything. ... Most importantly is that when you put the cursor on a symbol, the bar at the top shows the declaration. ... If you hover over a symbol, the down arrow appears, clicking it gives you a menu with "Find References" in it. ...
    (microsoft.public.vc.mfc)
  • Re: Type A Question
    ... your cursor is in the formula name, ... the relevant help article... ... Double clicking the cell will show you ... all of the formula's references too which might help you ...
    (microsoft.public.excel.newusers)
  • Re: Properities Meanings
    ... The best references is while your cursor is in the particular property, ... simply hit f1.... ... I can't think of a better refernce then the help in this case.... ...
    (microsoft.public.access.forms)
  • Re: Embed a Custom Cursor?
    ... Every time it reaches the cursor statement, I get a "Object reference not set to an instance of an object." ... I don't see a 'command line options' field anywhere...??? ...
    (microsoft.public.dotnet.languages.csharp)