SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2005
    Location
    NewJersey
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    objects with different memory addresses

    we are extracting a non-gui java object from a customised application, and passing it into a function call in the same application. It seems to us that the object passed to the Function call is different memory address,then the original object pulled from the application. Any thoughts about what's going on here?

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: objects with different memory addresses

    When you create an object, you will set aside memory space for it. Now, IIRC when you pass the object to a function, it will create another instance of the same object for the function to work with, hence it will be in a different memory location.

    You could always try passing a reference to your original object to the function?

    Thats just my 2cents and I could be wrong [img]images/icons/smile.gif[/img]
    I'm not a complete idiot - some parts are missing.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:20 PM.

Copyright BetaSoft Inc.