473,498 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

freeing objects

Let's say that I've the following code (pseudo code cause this is a
question about how php gc works)

file class.php
------------------
class ClassX {
//var $F_strDB;
others vars here

function DoWathEverDBJob(){
connectToDB (using class variables as $F_strDB)
queryDB
process results
(# 1)
return (true-false, not an array nor a result set)
}

} //class
file test.php
------------------
$classX = new ClassX;
$classX ->DoWathEverDBJob();
(# 2)
Questions

-Should I have to call mysql_free_result in (# 1)

-Should I have to "destroy" $classX in any way in (# 2)

I used to think that objects and queys would be destroyed
automatically, but i'm not sure right now...

regards - jm

Jan 18 '06 #1
1 1187

julian_m wrote:

-Should I have to call mysql_free_result in (# 1)


I should have written this way I guess:

Should I call mysql_free_result in (# 1)?

regards - jm

Jan 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1801
by: .:: MaStErDoN ::. | last post by:
Hi! I'm working with arrays, saving on them information about files. All works fine but the problem is that when i finish using them and i remove all the information using: for index =...
10
2059
by: dmanhr | last post by:
Hi! I'd like to free-up - destroy (myself not GC) object n (Node) with implementing Dispose(). I have linked list: class Node{ CNode nextNode; object data;
6
2743
by: Fernando Cacciola | last post by:
Help me out here please: While watching Brad Abraham's MSDN TV talk about the Dispose pattern, refering to: public virtual void Dispose ( bool disposing ) { if ( disposing ) { <-- WHAT...
15
1750
by: yehoshua | last post by:
Is there anyway to explicitly tell the garbage collector you are done with an object? In my app I have a point where I am sure there should be no references to an set of objects (well i remove...
7
2405
by: Adam | last post by:
I have a managed cpp wrapper. Im using this in a native dll as a static variable. I need to free this library when the dll is done being used. The perfect place to do this is DllMain for...
0
881
by: Benjamin Rutt | last post by:
I have a bunch (e.g. 40) of tkinter Text objects in a gui on a linux machine, tracking monitoring info per host. They accumulate up to 500MB of text data (according to /bin/top) over time reading...
5
3137
by: Amogh | last post by:
Hi, My question is related to setting freed pointers to NULL. After freeing a pointer: 1) Should the freeing routine also be responsible for setting the pointer to null? 2) Or, should the...
3
1391
by: billq | last post by:
Hello, I am new to c# and have become confused about freeing resources. I need to know if using an objects Dispose method does the same thing as setting the object to null? Pen bluePen = new...
11
1976
by: vivek | last post by:
Hello, I have a pointer to a main structure which again consists of structures, enums, char, int, float and again complex structures. When i free all the contents of the main structure, it...
2
2097
by: headware | last post by:
Do dynamic arrays declared using ReDim have to be freed? I assume that if it's an array of dynamically created objects (e.g. Scripting.Dictionary), each one of those objects will have to be set to...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.