Howe can I tell when there are no references to an object?

Hi all,
Is there any way for me to know when there are no references to an object without using finalize()?
I want to pool created objects when it is safe to do so.
finalize() won't work since it is called only once for every object instance.
Regards,
Marcus

If you are trying to establish an object pool by placing the objects back in the pool when there are no references to the object, then I am afraid you are out of luck.
If there were no references, then you would not have a "handle" on the object to be able to manipulate it in any way (like putting it back in the pool).
If you are talking about something else, then the classes in java.lang.ref.*, might be of use.
If you are really trying to pool objects, then you should have some sort of "close" method in the objects that is called when they are no longer needed and can be returned to the pool.

Similar Messages

  • I just got an IPAD2 on Saturday.  With the Mac, I could always tell when programs were open/running by going to the menu bar.  How can I tell what programs are running in the background.  I am struggling with not being able to go to a menu bar at the top

    I just got an IPAD2 on Saturday.  With the Mac, I could always tell when programs were open/running by going to the menu bar.  How can I tell what programs are running in the background.  I am struggling with not being able to go to a menu bar at the top

    You can see which apps are open and/or recently used by double-clicking the home button to bring up the taskbar at the bottom of the screen (not all apps that appear there are active) - you can then close apps on it by pressing and holding one of them for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar. If you have an app 'open' on-screen then it won't appear on the taskbar, you will need to go back to the homescreen first, and it should then show when you next open the taskbar.
    If you haven't already got a copy then you can download the iPad manual from here : http://support.apple.com/manuals/#ipad

  • How can I tell when an ical event was added?

    I'm on a shared ical calendar and there are times when 2 events have been put on at the same time.  How can I tell when the event was added and by who?
    Thanks!

    sharifrommo wrote:
    I am concerned that someone used the card on a different account. I'm assuming based on what you indicate that it can't be traced?
    If there is a legal issue I am sure Apple would properly respond if the records were subpoenaed, but short of that I do not know of a way. 

  • What is iMovie doing after update?  How can I tell when it's done?

    "Updating" a whole lot of old iMovie events to the new iMovie 10 library.
    When I tried to trash the old events the OS warned that they were "still in use".  No problem, I thought.  Shut down iMovie, and then trash the old events.
    Well, when you try to shut down iMovie it tells you there are still "tasks being completed in the background" and that if you shut down they won't ever be completed.
    so......
    What are these tasks?  (iMovie 10, after a big import, is using about 20-25% of a CPU continuously, according to Activity Monitor)
    If I do shut down despite the warning what are the consequences?
    How can I tell when it's done and I can safely shut down iMovie? (I guess I sould wait and see if it ever stops warning me).

    Did you read the manual? It's usually explained on what does all this stuff mean on the screen. I don't think the manual that comes with the Micro isn't the player's guide but if you install the software I think, you can look it up by going through Start>Program Files>Creative>Creative Zen Micro>User Guide. This is the default directory.
    Anyway, yes your Micro is charging and if you want to play your music on your MP3 player while it's charging you can use Nomad Explorer to play the music on your computer or use Creative Mediasource to play the music and hear it from your MP3 player. You can't control your MP3 player so just use your computer. It's not that hard to learn.

  • HT4914 How can you tell which songs are downloaded from the cloud on an ipad

    How can you tell which songs are downloaded on the iPad from the cloud?

    I know ipad albums are more like tagging photos rather than putting them in folders. I just have a nagging feeling I missed some pics and I have too many to try to go figure out one by one. I don't look at my photos from the camera roll, only from albums I tagged just because I imported photos from different sources and the dates and order is really messed up. I just want to know that I am viewing all the photos from like this vacation or that event and there's none I missed that are only in the camera roll.

  • How can you tell if messages are blocked with ios7

    how can i tell if imessages are blocked with ios7 and can it block facebook im?

    Selected guides should become light blue when they're selected. My guides are using the default color of cyan and the guide on the right is selected in the image below.
    If you have your guides set to the light blue selection inside the Guides Color drop down menu then you won't see a difference because that specific light blue is the color the guide changes to when it's selected. You can also click on the swatch in the Guides and Grids preferences to select any color you want from a color picker.

  • How can i tell what devices are accessing my iMessages?

    I suspect someone has set up an iPad to download my iMessages without my authorization. How can I tell what devices are linked to my phone's iMessaging?

    Thank you both. I am changing my password...I was just hoping there was some way I could tell if this other person had been reading my iMessages up to this point. It seems like there is not. How about this scenerio: I turn off the iMessaging on my phone. I have someone who has iMessaging send me an iMessage. We see if their device registers their message as "delivered" even if it doesn't come through to my phone. Would that indicate then that it had been delivered to another device?

  • How can I see if there are files present in this sourcing staging ftp folder:

    Hi All,
    How can i see if there are files present in the below parth in SAP Sourcing staging dtp folde.
    Upload Directory:usr/fciintegration/abce/materials/upload
    Please help me .
    Thanks
    Peeysuh Ranjan

    It should not be difficult if you have access to the staging server. Just like any other machine, navigate down the folder structure and see if it has files.
    I don't think it is possible to tell from the Sourcing application directly.
    Thanks
    Devesh

  • How can I tell if programs are running in the background.

    iPod touch version 4.2.1, how can I tell if programs are running in the background.  Battery is dead quickly and time/date reverts to Dec 31, 1969.  can see thin silver frame around screen like something is running in background.

    You really can't tell unless you hear music or similar. Many are always listening for notifications and other things.
    To preserve battery life see the following:
    Apple - Batteries - iPod
    I leave mine in airplane mode when sleeping.

  • How can I tell when my macpro was bought or made?

    How can I tell when my macpro was bought or made?

    Mac Pro (desktop) issues should be asked in its forum area.  This area is for Macbook Pro issues. 

  • On IOS 7, how can you tell when your battery is charging for your phone?

    on IOS 7, how can you tell when your battery is charging for your phone?

    thanks everyone=you all helped.
    I wasn't used to not getting the 2 sided plug- now I know I am ok>
    **hugs**

  • I'm having trouble turning on my ipad and how can I tell when it's fully charged?

    I'm having trouble turning on my ipad and how can I tell when it's fully charged?

    Try a Reset - hold the Home and Sleep/Wake buttons down together for 15 seconds.
    Have you read the User Guide?
    Unless the charge indicator has bee turned off you see the percentage charged in the top right of the screen.

  • How can I tell whether there is a Trojan on my Mac?  I downloaded two file that looked legit but I think they were not. They originated in theory from eFax . I am on OS X 10.6.8

    How can I tell whether there is a Trojan on my Mac?  I downloaded two file that looked legit but I think they were not. They originated in theory from eFax . I am on OS X 10.6.8

    You could try doing a scan with one of the tools mentioned here:
    http://www.thesafemac.com/mmg-antivirus

  • How can I tell when a text message is  received and opened

    how can I tell when a txt message has been received and opened ?

    Correction: How will I know when a SMS or MMS text message has been received and opened when the person I'm texting has an Android phone ? My last phone was Android and had a setting that notified me when my sent texts were received by someone. Just got my iPhone about a week ago.  Totally different.                                                                                                                                                                                             
                     

  • How can I tell when a product was first purchased

    How can I tell when a product was first purchased

    Apple - Support - Check Your Service and Support Coverage you will see the date when your warranty is about to expire, subtract the time it has been in warranty and you'll know the data of purchase.

Maybe you are looking for

  • One domain, 2 sites but I only want one of them!!

    I hope someone can help. My laptop was stolen earlier this year. At that point I was unaware of how to transfer my website created in iweb to another computer and so created a new website. I was actually quite happy to do this as the old website had

  • Is SP needed for windows 8 clients?

    I run a small office with a NW6.5 server. Back in the day (20 years+), I was a support guy. I've stuck with NW since. I rarely do maintenance, so I'm always rusty. Good sign for NW! So we upgraded the hardware on our XP workstations twice over the ye

  • How to avoid leading space -char(160) in Apex items

    Hi I'm getting a leading space in one of my apex item (text area). Further check reveals that it is char(160). Could any one help me in this to avoid leading space in the item. Many Thanks --Vijay                                                      

  • HT1998 Airport Utility 6.2 no options for managing MAC filtering

    Any ideas how I can manage add a MAC address that is allowed?

  • No Shared Storage Available (RAC Installation)

    Hello Guys, I am in process of installing RAC 10G R2 on windows 2000 operating system. Well i am going for 2 node clustering. The problem is that we dont have any shared storage system like SAN. Is it possible that we can use any other computer's HDD