473,503 Members | 6,587 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

objects... asp does... php doesn't

Hi all,

I have a system running IIS en Apache. It is also running ASP and PHP.

Why would

<%
Dim obj1
Dim var1

Set obj1 = Server.CreateObject("conv1.conv2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;
$var1 = $obj1->property1;

$obj1 = null;
?>

not? In both instances the object does get created!!
TIA
Roger
Jul 17 '05 #1
6 1884
PI*****@HOME.NL wrote:
<% sorry, don't know asp
<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;

Is this a function call?
If it is, I guess you need parentheses, like
$obj1->method1();

--
--= my mail address only accepts =--
--= Content-Type: text/plain =--
--= Size below 10K =--
Jul 17 '05 #2
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.

"PI*****@HOME.NL" <PI*****@HOME.NL> wrote in message news:<1f********************************@4ax.com>. ..
Hi all,

I have a system running IIS en Apache. It is also running ASP and PHP.

Why would

<%
Dim obj1
Dim var1

Set obj1 = Server.CreateObject("conv1.conv2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;
$var1 = $obj1->property1;

$obj1 = null;
?>

not? In both instances the object does get created!!
TIA
Roger

Jul 17 '05 #3
Chung Leong wrote on Friday 28 November 2003 20:44:
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.


It's not just COM. In my experience, there is no way to free the memory
that's taken up by any object in PHP until the script execution ends. This
applies to PHP4; I haven't tested PHP5 yet.

--
Business Web Solutions
ActiveLink, LLC
www.active-link.com/intranet/
Jul 17 '05 #4
I wasn't talking about PHP failing to release memory within a given
script. The leak I was encountering persists after the script has
completed execution. When PHP is running as an Apache module on
Windows, this would lead eventually to a server crash.

I've spend a bit of time with PHP 5 beta 2 and I can report happily
that memory management is much better. A script that would grind to a
halt in PHP4 is able to run uneventfully in PHP5.

Zurab Davitiani <ag*@mindless.com> wrote in message news:<wE*******************@newssvr25.news.prodigy .com>...
Chung Leong wrote on Friday 28 November 2003 20:44:
In my own experience I've found that COM doesn't work very well in
PHP4. It has a way of rapidly leaking memory. You might want to stick
with using ASP if you must make use of COM objects.


It's not just COM. In my experience, there is no way to free the memory
that's taken up by any object in PHP until the script execution ends. This
applies to PHP4; I haven't tested PHP5 yet.

Jul 17 '05 #5
False, ASP dont use () for method call

Savut

"Pedro Graca" <he****@hotpop.com> wrote in message
news:bq*************@ID-203069.news.uni-berlin.de...
PI*****@HOME.NL wrote:
<%

sorry, don't know asp
<?php
$obj1 = null;
$var1 = null;

$obj1= new COM("conv1.conv2")
$obj1->method1;

Is this a function call?
If it is, I guess you need parentheses, like
$obj1->method1();

--
--= my mail address only accepts =--
--= Content-Type: text/plain =--
--= Size below 10K =--

Jul 17 '05 #6
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
False, ASP dont use () for method call


But you're not using ASP, you're using PHP. And PHP requires () on
method calls.

--
There is no signature.....
Jul 17 '05 #7

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

Similar topics

5
1495
by: Andy Buckley | last post by:
Hi, A friend and I have recently had trouble getting code to compile when using temporary objects in constructors. A minimal example is below: This code fragment is used to construct seven ROD...
48
3426
by: Andrew Quine | last post by:
Hi Just read this article http://www.artima.com/intv/choices.html. Towards the end of the dicussions, when asked "Did you consider including support for the concept of immutable directly in C#...
7
4110
by: Jay Douglas | last post by:
In C# 2.0 I need to compare instances of an object to see if they are equal based on an id property. The object properties are class Cat { int CatId; string CatName; }
66
3445
by: Mike Meyer | last post by:
It seems that the distinction between tuples and lists has slowly been fading away. What we call "tuple unpacking" works fine with lists on either side of the assignment, and iterators on the...
161
7683
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
25
2737
by: Penelope Dramas | last post by:
Hello, I'm in a front of very serious .net redesign/rewrite of an old VB6 application. I had been asked to make it .NET 2.0 and would like to ask couple of questions regarding data access as...
27
2525
by: SasQ | last post by:
Hello. I wonder if literal constants are objects, or they're only "naked" values not contained in any object? I have read that literal constants may not to be allocated by the compiler. If the...
3
9243
pbmods
by: pbmods | last post by:
AN INTRODUCTION TO FUNCTION OBJECTS LEVEL: INTERMEDIATE PREREQS: OBJECTS You've seen it before. You're setting up an XMLHttpRequest call, and you need to execute a function when it returns, so...
14
5976
by: Jess | last post by:
Hello, I learned that there are five kinds of static objects, namely 1. global objects 2. object defined in namespace scope 3. object declared static instead classes 4. objects declared...
19
10725
by: Daniel Pitts | last post by:
I have std::vector<Base *bases; I'd like to do something like: std::for_each(bases.begin(), bases.end(), operator delete); Is it possible without writing an adapter? Is there a better way? Is...
0
7193
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
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
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
5562
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
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
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 ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.