473,657 Members | 2,574 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.CreateOb ject("conv1.con v2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

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

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

$obj1 = null;
?>

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

$obj1= new COM("conv1.conv 2")
$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.N L" <PI*****@HOME.N L> 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.CreateOb ject("conv1.con v2")
obj1.method1
var1 = obj1.property1

Set obj1 = Nothing
%>

work and

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

$obj1= new COM("conv1.conv 2")
$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.c om> wrote in message news:<wE******* ************@ne wssvr25.news.pr odigy.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.conv 2")
$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
1501
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 objects and run their doSomething() method (which is trivial). As far as we can tell, all seven methods should successfully construct a ROD object using temporary objects as constructor parameters, but using
48
3467
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# and the CLR?" Anders' reply included this comment: "The concept of an immutable object is very useful, but it's just up to the author to say that it's immutable."
7
4116
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
3487
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 values side. IIRC, "apply" used to require that the second argument be a tuple; it now accepts sequences, and has been depreciated in favor of *args, which accepts not only sequences but iterators. Is there any place in the language that still...
161
7806
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.. (After reading that
25
2764
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 this application is heavily data-centric around MSDE database. Would it be better to use custom business objects or extend
27
2551
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 Standard is saying that "object is a region of storage", I deduce from that that literal constants aren't objects because they may not be alocated as regions of storage in the memory.
3
9264
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 you do something like this: http.onreadystatechange = myAwesomeFunction;
14
6008
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 static inside functions (i.e. local static objects) 5. objects declared at file scope.
19
10742
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 there an existing adapter? Thanks, Daniel.
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.