Do I need to call AS3_Release

If I create an object in C++ code and return it in ActionScript code should I call AS3_Release before returning it? For example, I have the function in the *.gg file:
public function makeThumbnail(...): Object
     AS3_Val objDestByteArray = AS3_New(ByteArray_class, no_params);
     int intDestWidth;
     int intDestHeight;
     // ...  make some calculations and set results as object properties
     AS3_Val result = AS3_Object("width:IntType, height:IntType, data:AS3ValType", intDestWidth, intDestHeight, objDestByteArray);
     // Do I need to call this?
     //AS3_Release(objDestByteArray);
     //AS3_Release(result);
     return result;
Should I call AS3_Release for objDestByteArray and result variables?

No you don't on the return.
return automatically "releases" the reference.
but you do need to call it on the
AS3_Release(objDestByteArray);
Basically anything that you create new that is not returned should be released.
-Art

Similar Messages

  • New to Web Services - need to call a HTTPS web service from PL/SQL

    I am new to Web Services and need to call HTTPS web service from PL/SQL program. I am using 10g Database.
    I have been reading there are 2 options -
    1. UTL_HTTP - with this package its possible to call HTTPS web services
    2. UTL_DBWS
    Questions -
    1. Is it possible to call a HTTPS web service using UTL_DBWS ? I have not been able to find any information on it.
    2. Can someone point me to UTL_HTTP and UTL_DBWS examples calling a HTTPS web service ?
    3. The HTTPS web service that I need to call needs username/password to connect - how will I incorporate this in the pl/sql code ?
    Appreciate the help.
    Cheers,
    newWebServicesUser

    Hi,
    1. UTL_DBWS not work for https from what I understand
    2. Here is a sample example:
    [http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php#]
    Be careful, you must change http/1.0 IN 1.1 inside package SOAP_API.
    Here is an example for a prime number where the SOAP message is already construct:
    CREATE OR REPLACE procedure test_ws_2
    IS
    http_req utl_http.req;
    http_resp utl_http.resp;
    request_env varchar2(32767);
    response_env varchar2(32767);
    begin
    -- Set proxy details if no direct net connection.
    UTL_HTTP.set_proxy('http://<USER>:<PASS>@10.0.2.21:8070', NULL);
    UTL_HTTP.set_persistent_conn_support(TRUE);
    request_env:='<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">'||
    '<SOAP-ENV:Body><GetPrimeNumbers xmlns="http://microsoft.com/webservices/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    '<max xsi:type="xsd:int">10</max>'||
    '</GetPrimeNumbers></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    dbms_output.put_line('Length of Request:' || length(request_env));
    dbms_output.put_line ('Request: ' || request_env);
    http_req := utl_http.begin_request('http://www50.brinkster.com/vbfacileinpt/np.asmx','POST', utl_http.HTTP_VERSION_1_1);
    utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
    utl_http.set_header(http_req, 'Content-Length', length(request_env));
    utl_http.set_header(http_req, 'SOAPAction', '"http://microsoft.com/webservices/GetPrimeNumbers"');
    utl_http.write_text(http_req, request_env);
    dbms_output.put_line('');
    http_resp := utl_http.get_response(http_req);
    dbms_output.put_line('Response Received');
    dbms_output.put_line('--------------------------');
    dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
    dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
    utl_http.read_text(http_resp, response_env);
    dbms_output.put_line('Response: ');
    dbms_output.put_line(response_env);
    utl_http.end_response(http_resp);
    end test_ws_2;
    Otherwice for testing url, i recommand you to use that function: Re: Error using UTL_HTTP over HTTPS
    it's a verry helpful function when you have an error.
    wrote:
    When testing using UTL_HTTP, you MUST ensure that you open a new session after importing the SSL certificates into your Wallet,
    as I've learned (the hard way) that existing sessions point to the wallet contents that were present when the session was opened.
    If you don't realise/know this, it can cause a lot of additional frustration during testing, when you keep getting the ORA-29024 exception AFTER
    you've imported the SSL certificates................. ;) 3. i think you can use that after the begin_request but not sure :
    UTL_HTTP.set_authentication(r => http_req,
    username => ,
    password => ,
    scheme => ,
    for_proxy => );
    Edited by: Malebodja on Oct 22, 2009 6:53 AM
    Edited by: Malebodja on Oct 22, 2009 6:55 AM

  • Does anyone know why a web page would suddenly pop up telling me I have a computer virus and need to call them?  When I've called they said they needed access to my computer in order to fix the problem - which I didn't do.  Is this legit?  An Ad?

    Does anyone know why a web page would suddenly pop up telling me I have a computer virus and need to call them?  When I've called they said they needed access to my computer in order to fix the problem - which I didn't do.  Is this legit?  An Ad?

    That is not legit, it is a scam to gain access to your computer and information.
    You can protect against pop-up adware with the AdwareMedic tool Thomas Reed has http://www.thesafemac.com Tom is a major contributor on these communities and great security guy.

  • Need to call webservice WSDL directly from Java code

    Hi All,
    I hope u all are doing great.
    I am new to web services and i have a requirement where i need to call the webservice directly from the java code, we dont need any middle layer(via proxy n all).
    Can you all please help me on this, we are using Jdeveloper 11g and we do have WSDLs
    we shld be able to use the wsdl in code and pass the request and get the request
    Any help will be appreciated
    Thanks

    @Puthanampatti     
    Thanks, but i already went through this link and seems this link also says we need to access webserivice through stub,dii etc.
    I want straught java code to access webservice without any tier in between
    Thanks

  • Need to call funtion in stored procedure to run one customized report

    Hi,
    I need to call one function in stored procedure for our customized report. Can anyone please help me in calling the function in stored procedure and provide the syntax for the same.
    Thanks,
    Kalpana.

    Either open an existing report. You'l see so many examples.
    or
    http://www.google.co.in/#hl=en&source=hp&biw=1024&bih=586&q=call+function+in+stored+procedure+sql&aq=1&aqi=g2g-m2&aql=&oq=Call+function+in+stored&gs_rfai=&fp=dbefe777997d3915

  • Need to call user defined table in Report

    Hi there,
    In my report, need to call user defined database table. This table contains 2 columns one for checkbox. After calling this table, user has to check required rows and save changes. can we create transaction code for this table and call from within report? anybody pls suggest how to implement this requirement.
    Regards,
    Zakir.

    Zakir,
    U can do it in both the ways (TXN or rept).
    If rept, use an itab to check and insert rows to the DB tab.
    If mod pol, use a table control and update db tab...
    Reward if helpful,
    Karthik

  • HT1937 activated phone on the 23 of Dec - phone works on outgoing call but the ported phone number is still inactive - do I need to call T-Mobil to turn off T-mobil?

    When can I expect the phone to be opperatible for incoming calls with my ported phone number?

    Sorry this isn't a live chat room.  This is a user to user technical forum.  Not all questions will be replied to promptly.
    the issue your having is a carrier issue, you will need to call T-mobile to resolve your issue.

  • Need to call Smartform from MB90

    Hi All,
    Ii need to call the custom smartoform for consignment goods issue ,could anybody please tell me the standard report to configure in nace.
    Thanks,
    Kumar

    Hi Kumar,
    Please go through this [MB90|http://wiki.sdn.sap.com/wiki/display/ERPSCM/OutputDeterminationinInventoryManagement+(IM)].
    If need you can create a custom form create and assign it.Check and post if there is any issue.
    Regards,
    Madhu.

  • Why do we need to call start() to execute a thread.

    hi,
    Why do we need to call thread.start() to execute a thread. why not just calling run().
    Vjoy

    hi,
    Why do we need to call thread.start() to execute a
    thread. why not just calling run().
    Because, start() does two things.
    - start a new thread of execution and then
    - call the run method....and calling run does NOT start a new thread of execution. It's just a plain old regular method.

  • Need to call a configuration dynamically in SAP CRM 2007

    Hi,
    I need to call one configuration dynamically. In the runtime one configuration should be called upon fulfilling some conditions.
    I need your help regarding this.
    Points, Guaranteed.
    Thanks,
    Santosh

    Hi Santosh,
    We have made a solution where we call different configurations based on the UI object type. In the IMG entry called "Define UI Object Types" you can create a new custom object type. This you can use when you configure your view in transaction BSP_WD_CMPWB. Here you then copy your standard configuration to a new one. In the new one you set Object type = the object you have created in customizing. And config key you set to the same as you normally use. Then you have two different configurations that can be called depending on your requirements. We call it based on the business role of the users. But you can of course yourself determine on what criteria the method should call one or the other configuration.
    In the method you will need to set the variable cv_object_type to the name of your own object type. Then the system will use this key to determine the configuration. After implementation you will see that it uses this object type by clicking F2 button in the UI.
    /Anders

  • Need two calls to my BPEL/ESB process

    Hi !
    I'm doing an integration where the source system can't product all data needed in one call.
    (They have ready made interfaces)
    So step one is to create a call to my process with personal data, such as name, birth date.
    Next step is to create a call with employment data with salary data.
    How do I create a process like that in the best way. Is it ESB or BPEL.
    Is it possible at all ?

    Hi,
    Yes it is possible. Because you are pulling data you will need a caller process. You can not do this in ESB alone because ESB itself is passive, so BPEL would be in place.
    I assume the interfaces are already implemented as (a) web service(s) or adapter(s).
    Create a BPEL process and in it you create (a) partnerlink(s) for the interfaces. Next, drag 2 invoke activities into the process. The first invoke retrieves the 1st message (personal data), the second invoke retrieves the employment data.
    Something like this (assign activities left out for clarity):
          |
          |
       [invoke1] <-----  partnerlink to retrieve personal data
          |
          |
       [invoke2] <-----  partnerlink to retrieve employment data
          |
         ...

  • I need to call some privileged APIs and need some help on this.

    First the Basics:
    This program auto-launches each time a user logs in. It is an authentication type of program. Only users with this app running will be allowed to use a secure network.
    I need to be able to read and write from the route / arp tables, and possibly be able to 'reset' a network adapter. These are the privileged APIs I need to call. I have only found "UNIX" APIs to do this, no apple APIs although I am sure they would have the same restrictions.
    Anyway, what I don't want is that elevate privileges prompt each time a user logs in. I am sure this would become very annoying.
    Possible solutions (I have no idea how to do these):
    1. The installer sets it up to run with admin / privileged access when it starts. I only know how to get a program to start with user privileges (the one that logged in).
    2. The installer flags / registers something that this app can make those API calls. IE: The App is trusted.
    3. The program is split in to two parts and uses Interprocess communication to talk to the privileged part. This still leaves problem #1, how do you get an app to launch as privileged.
    Any other ideas and suggestions would be welcomed.

    What you normally do in this case is write a kernel extension that does all the work and then have a user interface that the user runs. What you are describing sounds very much like a VPN. This is exactly how the Cisco VPN software works, for example.

  • I need to call a html document

    I need to call a html document , that is i need to call
    Internet explorer/Netscape browser through forms say when a
    button is pressed or mouse clicked ,does anyone have a solution
    for this .
    Thanks,
    null

    Mohammed kamran (guest) wrote:
    : gang lee (guest) wrote:
    : : Mohammed Kamran (guest) wrote:
    : : : I need to call a html document , that is i need to call
    : : : Internet explorer/Netscape browser through forms say when
    a
    : : : button is pressed or mouse clicked ,does anyone have a
    : solution
    : : : for this .
    : : : Thanks,
    : : reply:
    : : use "show_document" build-in
    : I used the built in WEB.SHOW_DOCUMENT long back but this
    doesn't
    : work .
    : Thx
    Try with:
    DDE.APP_BEGIN.........
    null

  • I need auto call reject how can make it in iphone 4s. 6.0.1

    I need auto call reject in iphone 4s 6.0.1

    Call blocking is not a feature that is available on the phone. You'd need to contact your carrier to see what services they offer.
    You can quickly silence the ringer for calls you don't intend to answer by tapping the power button once. Tapping it twice will send a call directly to voice mail.

  • What is the need for calling default constructor by JVM?

    What is the need for calling default constructor by JVM? why the JVM should intiializes default values to the data
    fields if the constructor is not there in our class?

    mahar wrote:
    What is the need for calling default constructor by JVM? Huh? The JVM does not need to call the default constructor. It needs to call a constructor.
    You decide which one by the way you use "new".
    why the JVM should initialize default values to the data fieldsHuh?
    ... if the constructor is not there in our class?Huh? The default constructor is always there. It may be private but it is still there.

Maybe you are looking for