VirtualBox

Changeset 107151 in vbox


Ignore:
Timestamp:
Nov 27, 2024 8:04:59 AM (7 weeks ago)
Author:
vboxsync
Message:

Fixed the case with lifetime equal to 0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ObjectsTracker.cpp

    r107131 r107151  
    783783                        {
    784784                            /*
    785                              * Special case for the objects with lifeTime == 0.
    786                              * It's intended for such objects like Mediums or Machines or others.
    787                              * The objects which live from the beginning but may be deleted by user manually.
    788                              * for this object the idle time starts when user deletes it.
     785                             * Special case for objects with the original lifeTime equal to 0 (0 means endless).
     786                             * For these objects the idle time starts when user deletes it.
    789787                             */
    790788                            if (lifeTime == 0)
    791789                            {
    792                                 lifeTime = currTime - creationTime;//in milliseconds
    793                                 /* if lifeTime < 1000 msec (1 sec) set minimal lifeTime to 60 sec (1 min)*/
    794                                 lifeTime = lifeTime < 1000 ? 60 : lifeTime/1000;
     790                                /* set lifeTime to 60 sec (1 min) */
     791                                lifeTime = 60;
    795792                                /* Updating the object data */
    796793                                gTrackedObjectsCollector.setObj(temp.objectIdStr(),
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette