Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 102842
BY: Praveen Devarao (praveend)
DATE: 2012-11-15 07:52
SUBJECT: RE: When to free statements from execute

 

Hi Lucas,

I think, I unnderstood your concern. Let me know if I get it right.

Your referring to situations where the SQL issued is something like insert (and directly called via IBM_DBAdapter#execute), right? If that is the case then you will need to note one thing, In activerecord we donot call execute directly. It is invoked via the insert or update or select methods which take care of freeing the statement handles appropriately

Other thing that ibm_db driver provides is, it wraps the statement structure into ruby object giving it a free method (invoked during garbage collection), that frees the statement handle. But yeah, you will need to wait for the garbage collector to kick in and there should be no reference to the statament object.

Let me know if you I understood your problem rightly or need more clarification

Thanks

Praveen


Thread View

Thread Author Date
When to free statements from executeLucas Maxwell2012-11-15 03:07
      RE: When to free statements from executePraveen Devarao2012-11-15 04:27
            RE: When to free statements from executeLucas Maxwell2012-11-15 04:57
                  RE: When to free statements from executePraveen Devarao2012-11-15 07:52
                        RE: When to free statements from executePraveen Devarao2012-11-15 07:54
                        RE: When to free statements from executeLucas Maxwell2012-11-16 01:04

Post a followup to this message