Opened 6 years ago

Closed 6 years ago

#14520 closed bug (fixed)

Bug in BApplication API doc?

Reported by: ahwayakchih Owned by: nielx
Priority: normal Milestone: Unscheduled
Component: Documentation Version: R1/Development
Keywords: API, BApplication Cc:
Blocked By: Blocking:
Platform: All

Description

In example code of BApplication API (https://www.haiku-os.org/docs/api/classBApplication.html#details), there is something there that does not look right:

    BApplication app("application/x-vnd.vendor-application");
    app->Run();
    delete app;

I guess it's ok to create it on stack, but:

  • 2nd line tries to access function as if app was a pointer,
  • 3rd line tries to delete it, as if it was created on Heap (using new BApplication()) instead of Stack

Change History (3)

comment:1 by mmu_man, 6 years ago

Should be fixed in hrev52361.

comment:2 by ahwayakchih, 6 years ago

Thanks :)!

comment:3 by waddlesplash, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.