Garbage Collector & references

Hi there,
is there any possibility to determine in a class "B" if an instance of class "A" just exists because of a reference in class "B" and is not referenced from elsewhere?
That is, is there a possibility to determine how many references exist for a certain instance?
Sincerely
Karlheinz Toni

Because I do not really get how the garbage collector works and all the why's and when's memory is freed.
I am doing a xml/xslt Application beeing rather memory consuming (:(). If I try to work with 3-5 files at once each about 50Mb memory runs out :). So I would like to be able to delete all the objects at once if they are not needed anymore.
I thought like this:
1.) you could check every time after you used a object if there are still more than one reference.
2.) If not you've got the only one => free it
Just a thought. Can you imagine a better way (if yes what is it? :)
Thx
Sincerely
Karlheinz Toni

Similar Messages

  • How does the Garbage Collector handle reference-free objects?

    Hi,
    I am interested to know how the GC handle's objects created
    without a reference.
    The reason this has become of interest to me is that I have
    created a "Title" class. The Title class animates each letter of
    Title.text to appear in a cloud of smoke.
    The smoke is a simple particle system class, when a particle
    dies it removes it's associated MovieClip so that eventually all
    MovieClip's have been destroyed.
    Now in the Title class for each letter I do the following
    (psuedo-code):
    for( Title.text.length) {
    CurrentLetter.twAlpha = new Tween( blah, blah, blah); //
    object created
    with a reference
    new Smoke( CurrentLetter.x, CurrentLetter.y); // object
    created
    without a reference
    Although this is technique is not one I would ever have
    thought of in a language that doesn't use a garbage collector it is
    mentioned in the Tween documentation and my class works as
    intended.
    The thing is although it works, it always bothers me when I
    don't know precisely
    why it works!
    If it's working due to the short life span of the class in
    question and thus simply missing the GC's window then this could be
    problematic. If at some point it is still alive when the GC is
    called then my class could be prematurely deleted.
    Maybe a class which has a reference to an "alive" MovieClip
    is immune from GC?
    I Hope someone can shed some light on this topic as the GC is
    something that is thinly documented to say the least!
    :theory
    p.s. first post!

    Hi,
    I would say it would be better use FREE itab at the end of the processing in your code. In the end-of-selection in your code, you can FREE all your itabs that were used in the program. This is one of the good approach of optimizing the memory.
    Regards
    Vimal

  • How intelligent is the garbage collector?

    Hi all,
    I've got a question about how garbage collection works in an ABAP objects context.
    If there are no more references an object is cleaned up and the memory released. Fine.
    What about an object O1, which in turn creates another object O2. O2 however also contains a refernce to O1.
    When the original process completes, this leaves two objects that reference each other, but with no other contact to the 'outside world'. Is the garbage collector intelligent enough to dump them?
    Any input appreciated,
    Cheers
    Mike

    Hi,
    Thanks for the feedback. I am still not sure - you say 'when the program ends it's part'. This is exactly the point - when the program ends, do the objects remain because they still contain references to each other?
    More detail:
    The references are public instance attributes of both objects (different classes). I would prefer to use functional methods, but am stuck with public attributes which I'm populating in the constructor.
    So a process P declares a local var LV_O1 and does a CREATE OBJECT LV_O1.
    In the constructor of O1, it does a
    CREATE OBJECT me->ATTR_O2 to populate it's attribute with a reference to an instance of O2.
    O2 doesn't need to do a CREATE OBJECT, but assigns a ref to O1 to it's attribute ATTR_O1.
    So now O1 and O2 refer to each other by public attributes:
    O1->ATTR_O2 and O2->ATTR_O1.
    The big question is what happens when process P ends and it's variable LV_O1 ceases to exist?
    In case anyone's wondering about the overall wisdom of the design, they have to be public attributes (used in Workflow) and they have to refer to each other as instantiation may also happen the other way around.
    Cheers
    Mike

  • Inefficient garbage collector process - WLS 8.1 SP6 - JVM jdk142_13 (SUN)

    Hi all,
    I am trying to perform some tuning operations in my server (maestroServer_01) because the application uses the total amount of heap size and the garbage collector process is not running fine. The arguments used on this VM are:
    -server -Xms2048m -Xmx2048m -Xss512k -XX:PermSize=384m -XX:MaxPermSize=384m -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:+UseAdaptiveSizePolicy -XX:NewRatio=8 -XX:SurvivorRatio=12 -Xverify:none -Xnoclassgc -XX:+DisableExplicitGC -XX:+PrintGCDetails -Dweblogic.webservice.i18n.charset=utf-8 -Duser.timezone=$JAVA_TZ -DejbURL='t3://localhost:9081' -DjpdURL='http://localhost:9081'
    Please let me know if I can change these parameters in the WLS:
    Services -> Bridge -> Messaging Bridge Thread Pool Size -> from 5 to 20
    Configuration -> Tuning -> Socket Readers -> from 33 to 60, and disable "Enable Native IO" option.
    I got some informations from internet about some parameters that can be used to improve the memory utilization of this JVM. The parameters are described in the link below:
    http://java.sun.com/performance/reference/whitepapers/tuning.html
    Does anyone know what can be done? The WLS needs to be restarted every day!
    Thanks!

    yes regularely .. :-) (as you can see from the posts..)
    to your problem, the connectstring seems perfectly valid for a oracle light db installation (which we install within the bpel installation)
    can you check if this polite process is running?
    HTH clemens

  • Automatic Garbage collector after JVM almost hit max value on weblogic ?

    Hi All,
    I have application on weblogic 10MP2. I use 4G JVM. My application getting slow when the usage of JVM hit arround 70-80% of max heap size. Unfortunatelly, the garbage collector didn't run when it hit that high. So to keep my application in good state, I need to MANUALLY hit the Perform GC to keep the JVM below 70%.
    Is there any settings to tell the JVM to perform GC when the free space of the JVM hit 30%?
    What will the weblogic do if one of the server in warning state? There is a settings in the weblogic to specify when it hit some percentage of free space, it will bring the server to warning state. Will it do the Garbage Collector?
    Need your help on this. I am tired of hitting the Perform GC button.
    Really appeciate your help.
    Thanks,
    Eric

    I am replying to my own post because I found a tool that
    helped me solve in two hours what I had been stumped on
    for the past few days.
    The Heap Analysis Tool.
    I had a major memory leak problem. I couldn't locate
    the source until I downloaded and used this tool(for free).
    This tool keeps track of memory used by objects,
    each objects references, objects references by each
    object, and all objects instances. All of this information
    can be obtained in html format for efficient traversing
    of object chains. I would highly recommend looking
    this tool over if you intend on doing memory intensive
    programming.
    In case your curious where my error was I had two problems
    which are now fixed. One. I had a couple of BufferedImages
    that were leaking 30MB RAM. Two. I didn't know that using
    ObjectStream's to read/write objects stored references
    to the objects being written(preventing garbage collection).
    Deffinately worth running the Heap Analysis Tool before
    pointing a finger at System.gc().

  • Swing components and the garbage collector

    How much care does one need to take with swing components, with reference to running out of stack space? I ask because I'm writing a system for an automotive parts company, and the company tends to not reboot the machines very often...
    Anyway... if a JFrame is closed, is it and all its components marked for GCing? Do I need to call the dispose method, or is this part of the default close behaviour? Or is there something else entirely?
    Cheers

    In class that calls for .setVisible(false) of one JFrame u MUST call
    for dispose() method.
    so
    myFrame.setVisible(false)
    myFrame.dispose()
    myFrame = null // to help the garbage collector
    If u have classes that becames from JFrame (or JDialog) u can
    invoke in its constructors:
    this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
    This makes uncecessary to call for dispose() method explicetly.
    If u do not have this kind of classes u can invoke this method
    after u have create your JFrame
    JFrame myFrame = new JFrame();
    myFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
    The most important thing is REMOVE ALL LISETNERS that u have added, so, if u have classes that becames from JFrame u can ovverride
    the dispose method to do that
    eg
    public void dispose()
    super.dispose()
    removeActionListener(.....)
    and so on
    If u do not have this kind of classes u must remove all listeners u have
    added before u invoke the setVisible(false) method.
    Regards

  • Problem with garbage collector -

    I'm experiencing a problem with the Java Garbage Collector.
    It simply doesn't work when I try to free the memory that is used
    by an object in my program...
    I explicitly declared this object as null, and called System.gc, but it seems it isn't working.
    What might be the reason?
    This object uses a lot of memory. Therefore, I MUST destroy it after it's no longer
    needed.

    Ok. I'll try to be more specific...
    My "situation" seems something like that
    class Program {
    Xclass class1;
    void method1() {
    class1 = new Xclass();
    } (End of class Program)
    class Xclass {
    Yclass class2;
    Public Xclass( ) {
    class2 = new Yclass();
    add(class2);
    } (end of class Xclass)
    class Yclass {
    Public Yclass(Container parent) {
    (no explicit reference to Xclass or Program classes or any variable or instantiations of said classes);
    } (end of class Yclass)
    Well, I know that the gc is not being done because the first time I call method1 everything goes fine. But When I try it again an OutOfMemoryError happens...
    I tried to do the following (I know, it's not elegant, but I just wanted to get some results):
    void method1() {
    class1 = null;
    System.gc();
    class1 = new Xclass();
    Again it worked in the first time. But later...

  • Garbage Collector Questions

    Howdy all,
    I've got a few questions about flash's garbage collector.  I'm building a  game and have all elements in a container sprite called _gameContainer.
    _gameConatiners contains other sprites such as _hudContainer which  contains more containers such as _gameoverContainer, _menuContainer,  etc.  So there's a whole hierarchy of containers that are all contained  in _gameContainer which is added directly to the document class (not the  stage btw).
    So the whole thing should basically be Stage -> Document Class -> _gameContainer -> etc.
    When the player loses or wants to restart the game, I'm removing all  event listeners (which are defined as weak, but still rather make sure  there's no loose ends), stopping all music/sounds, removing  _gameContainer from the stage, and then setting _gameContainer to null.   From there I am re-calling my init function which creates everything  (_gameContainer, and everything inside of it, as well as creating all the  standard eventlisteners).
    Am I doing everything upside down?  Is this *a* proper way of restarting  a game?  Mind you I dont say "the" proper way since I'm sure there's a  hundred different ways to do this.
    Also, on a separate note... If I have something such as an enemy, I keep all  enemy logic contained in the class linked to the movieclip on the  stage.  Who should be calling add/removechild?  Should I be using a  factory method that takes care of all this, or should I have the engine  create the enemy, and then have the enemy remove itself from stage?   Currently I'm using a mix of both, but generally I'll have a function in  the engine/caller add it to stage, then have the class have an  ADDED_TO_STAGE event listener.  When it comes time to remove the class, I  have it call it's own removeself function such as: (_container is a  reference to it's container as mentioned above such as _hudContainer)
    protected function removeSelf():void
        if(_container.contains(this)) {
            _container.removeChild(this);
        _container.parent.parent.dispatchEvent(new Event(Engine.START_GAME));
    Thanks!

    Wonderful question Travisism.
    The garbage collection is strange.  First I'm curious why you lump displayObjects into _gameConatiners.  Does _gameConatiners get added to the stage at any point?  Why not just add the proper hud at the point its required?
    Anyhow.  By removing listeners ,removeChild(_gameConatiners), and setting _gameConatiners=null does not mean these classes are killed.  null only marks the memory locations as having no more references to them.  When this occurs these objects may be removed from memory.  Why do I say may, that is because it takes a specific amount of memory utilized to trigger the garbage collection.
    Now just merely setting _gameConatiners=null may not ever kill your objects off.  You would be required to profile this and make sure they are dieing properly.  From the sounds of it you have a lot of inner children.
    There is reason to believe that in some cases, when an object is removed from the main stacks that its children will be removed as well.  Though, if the inner workings are so large, often the objects within referencing each other effects the way the garbace collection is stating they are still in use.  Thus keeping these objects alive.
    Its always best to kill off every reference being used.  You can do this by ensuring each object in your movieClip class declared a kill method, and continue trickeling down each object.  This ensures each object will be properly marked.
    As far as your movieClips a factory method is only for the creation of objects, never for the removal.
    You're best bet is to have an object that holds all objects on the stage in a collection.  When you destroy the game. Itterate through this collection and remove them from the stage there.
    This would fit into your engine concept.  There is no reason to use a displayObject for that since its just an object.  Better Yet use a Vector.<DisplayObject> to optimize this.
    Back to your question is this *a* proper way to reset.
    Yeah and No.  The asnwer is based on the memory usage your application eats, and the amount of time to rebuild all objects.  Ideally you should Pool any resources that can be reused versus having to rebuild.
    For example.  If you have a screen that says Game Over.  why would you have to rebuild it on a reset?  There is no information that was changed.   Each clip instantiation takes memory allocated and time.
    Unfortunately without seeing what you have its difficult to say.  But init methods are good and it can be wise to rebuild objects to being again, but as i said it depends.
    Lastly, your line:
    _container.parent.parent.dispatchEvent(new Event(Engine.START_GAME));
    Should not have parent.parent references within.  If you are creating a new Event, at least fall back on eventBubbling to allow the event to travel to the parent.parent.
    You should never target parents like that in a class.  Best practices is to pass in parent.parent as a reference to the class.
    What if you were to add one more layer of parents to the _container.  Then you would have to continue modifying parent.parent.parent.  At least if you bubble the event you dont have to be concerend at all about who listens to it.

  • GARBAGE COLLECTOR( NOT ACTIVATING)

    I AM CERTIFIED, LEARNED IN THE COURSE THAT THE GARBAGE COLLECTOR IS A SYSTEM THREAD WHICH RUNS AND COLLECTS ALL THE UN-REFERENCED OBJECTS BUT I COULDN'T MANAGED TO ACTIVATE IT:
    THE PROBLEM IS DEFINED AS FOLLOWS:-
    1. WE KNOW THAT IF WE OVERRIDE THE FINALIZE METHOD OF AN OBJECT THEN IT IS CALLED WHEN THE SPECIFIC OBJECT IS GARBAGE COLLECTED.
    THATS WHY I OVERRIDED A CLASS'S FINALIZE METHOD AND ISSUED A PRINTLN STATEMENT
    2. THEN AT RUNTIME I INSTANTIATED THE OBJECT OF THAT PARTICULAR CLASS .
    3. I SET THE REFERENCE TO NULL.( AT RUNTIME )
    4. NOW ACCORDING TO THE DOCUMENTATION THE OBJECTED SHOULD BE GARBAGE COLLECTED AFTER SOMETIME BUT I WAITED FOR A ABOUT TEN MINUTES BUT IT ISN'T.
    PLEASE ANSWER THIS QUESTION AN IF POSSIBLE EXPLAIN THE MECHANISM BY WHICH THE FINALIZE METHOD IS CALLED AT RUNTIME
    IT SHOULD BE NOTED THAT THIS THREAD RUNS IN LOW MEMORY CONDITIONS BUT SINCE IT IS A LOW PRIORITY THREAD HOW CAN IT MANAGES TO RUN IN LOW MEMORY CONDITIONS

    The only purpose finalize should be used for is a last ditch effort to free resources other than memory allocation. That said...
    -It should NEVER be used to free a resource that is not automatically freed when the application exits. So for example it could be used to close a socket, but it should not exist when the 'resource' is a file.
    -It should NEVER be the only way to free a resource. There is a reason I said "last ditch". The user of the object should have an explicit method to call which frees the resources.
    And that said I would never use it regardless even for a last ditch cleanup. The reason for that is that it would tend to hide the improper usage of the class - in other words that the user wasn't calling the correct clean up method. I might use it to put a diagonistic (probably an unchecked exception) which indicates that the resource was not cleaned.
    Expanding further on the other comments made here, if you read the spec you will find that the language does not guarantee that finalize will be called. All that it guarantees is that if it is called it will only be called once. In addition finalize can reduce performance because the existance of it might (and probably will) force the garbage collector to do two passes on the object rather than just one.

  • Garbage Collector in JC 2.2

    Help: I am trying to understand how a Passive Garbage Collector (GC) implementation works in Java Card v2.2. As I understand it, Java Card vendors have the option to implement Automatic GC or a Passive GC under version 2.2 or higher.
    My question is as follows:
    What if object X no longer used, and was instantiate during the install() process:
    With Automatic GC: the GC would automatically reclaim memory after the process() method finish executing. If object X has no other references. Also, any other objects without any references would be reclaimed as well.
    With Passive GC: In the process() method the developer must call requestObjectDelete(), and before the next APDU request, the JCRE would reclaim memory. Is this right?
    What happens requestObjectDelete() is called on an object that still has references? Does it still reclaim it? In either Passive or Automatic GC?
    Do any vendors supporting Automatic GC? How about Java Card version 2.2.2?
    Thank you for any help
    Maguar

    What happens requestObjectDelete() is called on an object that still has references? Until now I haven't seen a method called "requestObjectDelete()" (and Google, too).
    Are you probably referring to the static method JCSystem.requestObjectDeletion() ?
    This method can not be called "on an object". It only allows to explicitly invoking the GC for freeing the memory allocated by objects that can not be accessed anymore.
    This solves the problem that current JavaCards are not multi-threaded. Therefore the GC can not be started in background as it does in the J2SE environment.
    By calling JCSystem.requestObjectDeletion() a JavaCard applet "voluntary" gives away CPU time to the GC. In single threaded environments this means that the caller (the JavaCard applet) is halted until the GC has finished its work.
    Jan

  • Garbage Collector seems not to run

    Hi!
    I have a problem with the garbage collector:
    To free memory, I regularly run the garbage collector in my app ( System.gc() ) after releasing resources by setting the reference variable to "null". But after some time I get an "out of heap memory" error. It seems that the gc doesn't run - I get the following result on the stdout:
    0 garbage collections (0 bytes collected)
    Is this possible? Or can I fix this problem?
    Thanks for your help

    Is it that the GC was not kicking-in even when you delete the references to the objects? That is true for any GC. GC will kick in only when you need more memory to create new objects
    Also, you need to tune your young generation space and increase it from default 2MB to 32MB which will avoid frequent young generation GCs. By setting Xmx to 1024 MB, VM will try to grow till 1024 MB and if it can't allocate because
    of less physical memory on your system, it will throw OutOfMemory errors.
    I suggest you try the following:
    1. Configure young generation to 32MB and old generation to 512 MB. This is how
    you start your app
    java -XX:MaxNewSize=32m -XX:NewSize=16m -Xms64m -Xmx512m -verbose:gc <app>
    This sets the initial heap size to 64MB. You can increase this if your initial startup memory requirement (static memory) is higher that 64MB.
    With Xmx set to 512MB, if some sessions die or are closed and heap size grows to 512MB, Full GC should kick in and you should be able to release memory for new sessions. Running with -verbose:gc will show if Full GC gets kicked in or not.
    2. Try can calculate the static memory required at any point of time and also how much garbage is collected in certain time period. Then using these values we can make changes in young and old generation sizes.

  • Garbage Collector Agent

    Hello, I want to know if the Garbage Collector deletes UnFoldered Document. I have created a custom relationship (ThumbnailRelationship) to attache a thumbnail file (a jpeg) to documents. Now, when some one delete a Document, do I have to create a Override to manually delete the ThumbnailRelationship and the Thumbnail document or the Garbage Collector will take care of it ? Where can I get more info on all those Agents running in the background ?
    Thank you
    null

    Hi -
    No, the GarbageCollectionAgent does not delete unfoldered objects. It cleans up references to objects that have been deleted. For example, say a user names testuser1 owns several documents. Then this user gets deleted - who owns the documents? Or more specifcally, what is the value stored in the owner column in the database table? The GarbageCollectionAgent firsts nulls these attributes, and for some attributes (PublicObject.Owner being one of them) it resets the existing objects to reference some other object.
    So, if you want the rightobject of a custom relationship to be automatically deleted when the leftobject is deleted, you'll have to do that via an override on your custom relationship subclass.
    I think the new admin guide has some more detailed information about the out-of-the-box agents.
    hope this helps-
    dave

  • Garbage Collector in 5.0

    I have nevver known, how the garbage collector internally works. Now a memory problem forces me to understand it. I read several articles but I do not understand them.
    I have a simple question:
    Is it possible, that my application will get an OutOfMemoryError even if a garbage-collect would free most of the memory?
    In other words:
    Is it assured, that garbage collector will always run before an OutOfMemoryError occurs?
    I have an application, which parses hundreds of MB of data. However it is assured, that parsed data wont be hold in memory for long time. Normally my application would run with less then 64 MB.
    In Java 1.4.2 I have not encountered any memory problems. But in Java 5.0 I encountered the following problem:
    My application runs a very long period of time. During this time, the memory usage is about 16 MB. After that period the memory usage suddenly increases and does not stop increasing until a OutOfMemory Error occurs (this is mostly about 260 MB if I set -Xmx265m).
    I am sure that I do not hold references to that much data in my application.
    Why does the garbage collector not free the memory?
    Is the garbage collector in 5.0 different from the one in 1.4.2? If yes, can I set the garbage collector to be that one of 1.4.2???
    Thanks and regards
    Fatih Coskun

    Is it assured, that garbage collector will always run
    before an OutOfMemoryError occurs?Yes, an OutOfMemoryError is the GC failing to free enough memory.
    Why does the garbage collector not free the memory?
    Is the garbage collector in 5.0 different from the one
    in 1.4.2? If yes, can I set the garbage collector to
    be that one of 1.4.2???Tiger (JDK 5.0) has introduced some "ergonomics" based on the machine the application is run on:
    http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
    Also, you may want to use jconsole and other new tools in tiger:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#debug
    -Alexis
    >
    Thanks and regards
    Fatih Coskun

  • Garbage collector in java

    Hi all,
    How does a garbage collector knows, when it should deallocate the memory of an
    object ?. And How can we make ready an object to deallocate it's memory by garbage collector ?.

    Hi all, Hi!
    How does a garbage collector knows, when it
    should deallocate the memory of an
    object ?.Objects are kept in a memory heap, and the objects that are having references are called dirty objects, and objects with no references are called clean objects(I think so, don't believe me).
    clean objects (and objects with weak references) are liable for garbage collection.
    there are certain thresold conditions (which I don't know), when they are reached, gc runs.
    These thresold conditions are jvm specific(jvm optimization), one could be when jvm feels it is going to get out of memory(again, don't believe me). You would have to go into details of jvm for that(I don't want to go there as I have lots of other things to learn).
    And How can we make ready an object
    to deallocate it's memory by garbage collector ?.there is no way you can control gc mechanism manually, because jvm have to take care of a lots of optimizations. so you can't predict when your object will be collected by gc.
    (that's why people don't beleave on finalize method).

  • Garbage collector as daemon thread

    hai
    y is garbage collector made as daemon thread
    what r the primary reasons?

    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=012268
    Are you guys in the same class?
    The Truth About Garbage Collection
    Reference Objects and Garbage Collection
    Garbage collection and performance
    Also, please make the extra effort to write out words such as "why" and "are". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.
    http://faq.javaranch.com/view?UseRealWords

Maybe you are looking for

  • IPod is not recognized by Updater or by Windows

    So far I've: 1. Followed the Five R's. 2. Restarted my computer 3. Tried to use the updater - but it does not recognize my iPod. 4. Tried to use Computer Management (Windows) to reformat my iPod, but it doesn't locate the iPod. 5. Tried an alternate

  • Depicting multiple rows' data in one row

    Hi All, Pls. check the below query: select manager_id mg_id, employee_id emp_id, last_name name from employees where manager_id = '100' and DEPARTMENT_ID = '80'if i run the following query, then o/p comes row wise; like below:        mg_id          

  • Please help! iPhone gone into recovery mode

    Hoping someone can help me, getting worried!!  I just plugged my iPhone 4s into my Windows computer to update and sync etc as I hadn't for a while.  During the updating and backup process, my phone just went into recovery mode, it disappeared from th

  • InDesign crashes when copying textbox

    There is a really annoying bug in the Mac version of InDesign which causes it to crash everytime I try to copy certain textboxes. I have no idea what cause those textboxes to crash but it happens consistantly with certain textboxes. Process:        

  • Connect Camcorder to Apple Macbook

    Hi all, I wanted to start backing up all my home videos to my apple macbook pro (spring 2010). But I am not sure how I can connect my old Sony CDD-TRV68 to my macbook pro. It doesn't look like this camcorder has any fire wire or usb ports (I could be