When to use $db->free_result?
#1
was wondering when should we use $db->free_result? 
thanks  Blush
Reply
#2
I'd say it is best practice to always use it, but I personally don't. Read the following:
https://stackoverflow.com/a/2502228
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#3
(2020-06-06, 08:19 AM)Omar G. Wrote: I'd say it is best practice to always use it, but I personally don't. Read the following:
https://stackoverflow.com/a/2502228

thx!
Reply
#4
free_result() is like testing... you use it when you're unsure of your code. You can't be a guru if you test or if you free resources Big Grin
Seriously, I never use free_result(), PHP & MySQL do it for me (cross fingers), I know I have to use it to follow best practices. Queries in plugins are rarely so heavy that they need to be freed, but if everybodies think that, troubles may arrive.
I'll try use it in next plugins / evolutions.

P.S.: I'm still not going do tests on my developments Big Grin
Tchat en français
Do not ask me help through PM or Discord

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)